表格元素练习

表格元素练习

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        th,
        td {
            border: 1px solid pink;
        }       
        table {
            border-collapse: collapse;
        }
    </style>
</head>

<body>
    <table>
        <caption>
            标题
        </caption>
        <thead>
            <tr>
                <!-- th -->
                <th>h11</th>
                <th>h12</th>
                <th>h13</th>
            </tr>

        </thead>
        <tbody>
            <tr>
                <!-- td -->
                <td>h21</td>
                <td>h22</td>
                <td>h23</td>
            </tr>

        </tbody>
    </table>
</body>

</html>
上一篇:Element-collapse


下一篇:HTML中table基本表格