zoukankan      html  css  js  c++  java
  • HTML table元素

    搬运,内容来自HTML Dog.

    简单示例

    <!DOCTYPE html>
    <html>
    
        <body>
            <table>
                <tr>
                    <td>Row 1, cell 1</td>
                    <td>Row 1, cell 2</td>
                    <td>Row 1, cell 3</td>
                </tr>
                <tr>
                    <td>Row 2, cell 1</td>
                    <td>Row 2, cell 2</td>
                    <td>Row 2, cell 3</td>
                </tr>
                <tr>
                    <td>Row 3, cell 1</td>
                    <td>Row 3, cell 2</td>
                    <td>Row 3, cell 3</td>
                </tr>
                <tr>
                    <td>Row 4, cell 1</td>
                    <td>Row 4, cell 2</td>
                    <td>Row 4, cell 3</td>
                </tr>
            </table>
        </body>
    
    </html>
    The table element defines the table.
    
    The tr element defines a table row.
    
    The td element defines a data cell. These must be enclosed in tr tags, as shown above.

    tr=table row=行

    td=table date cell=列元素

    示例2

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Basic table</title>
        <style>
            td {
                border: 1px solid #999;
                padding: 0.1em 1em;
            }
        </style>
    </head>
    <body>
        <table>
            <tr>
                <td>Cats</td>
                <td>Dogs</td>
                <td>Lemurs</td>
            </tr>
            <tr>
                <td>Tiger</td>
                <td>Grey Wolf</td>
                <td>Indri</td>
            </tr>
            <tr>
                <td>Cheetah</td>
                <td>Cape hunting dog</td>
                <td>Sifaka</td>
            </tr>
            <tr>
                <td>Caracal</td>
                <td>Red fox</td>
                <td>Brown lemur</td>
            </tr>
            <tr>
                <td>Wildcat</td>
                <td>Fennec</td>
                <td>Dwarf lemur</td>
            </tr>
        </table>
    
        <!-- Link back to HTML Dog: -->
        <p><a href="http://www.htmldog.com/examples/"><img src="http://www.htmldog.com/badge1.gif" alt="HTML Dog"></a></p>
    </body>
    </html>

  • 相关阅读:
    Orcle 导入数据eurusd.ctl
    Maven系列2pom.xml 配置详解
    UML关联&泛化的区别
    maven 创建工程
    maven 打包
    jprofiler安装和配置
    设计模式出现之前的几大原则
    检查启动情况linux
    领域模型
    解压命令tar
  • 原文地址:https://www.cnblogs.com/xkxf/p/7043667.html
Copyright © 2011-2022 走看看