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>

  • 相关阅读:
    13.11.1 __bases__类属性:
    logstash 删除message host字段
    数据科学:Oracle 并购 DataScience 公司提升机器学习能力
    继承
    python 创建子类
    Python第三方库的使用
    13.8.1 staticmethod()和 classmethod()内建函数
    实例方法和类方法
    CSS常用遮罩层
    CSS常用遮罩层
  • 原文地址:https://www.cnblogs.com/xkxf/p/7043667.html
Copyright © 2011-2022 走看看