Blogger Information
Blog 7
fans 0
comment 0
visits 2803
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
html表格标签-2018年01月14日
刘红长的博客
Original
604 people have browsed it

实例

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
     <!-- 表格中的各个标签支持一些属性设置,推荐用css去设置,这里咱们先了解一下这些原生属性 
    1、表头标签<thead></thead>,表体标签<tbody></tbody>,备注标签<tfoot></tfoot>.
    2、表标题标签<caption></caption> 。
    3、行标签<tr></tr>,单元格标签<td></td>,<th></th>其中<td>与<th>的区别:后者会加粗显示。
    -->
     <table border="1" cellpadding="20" cellspacing="0" width="500" height="150">
            <caption>2019年第一期php培训</caption>
            <!-- 表头 -->
                <thead>                                         
                <tr bgcolor="lightblue">
                    <th>学号</th>
                    <th>姓名</th>
                    <th>籍贯</th>
                    <th>兴趣</th>
                    </tr>
            </thead>
            <tbody>
            <tr>
                <td align="center">1</td>
                <td align="center">张飞</td>
                <td align="center">太空</td>
                <td align="center">玩刀</td>
            </tr>
            <!-- align="center"可以用到tr上再加方便 -->
            <tr  align="center">
                <td>2</td>
                <td>黄忠</td>
                <td>三国</td>
                <td>射箭</td>
            </tr>
            <tr  align="center">
                <td>3</td>
                <td>林志玲</td>
                <td>台湾</td>
                <td>臭美</td>
            </tr>
            </tbody>
            <tfoot>
                <tr align="center">
                    <td>备注</td>
                    <td colspan="3"></td>
                </tr>
            </tfoot>
        </table>
        
        <hr>
    
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例


Correction status:Uncorrected

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post