zoukankan      html  css  js  c++  java
  • Html table、thead、tr、th、td 标签

    Html table、thead、tr、th、td 标签

    案例一

    <!-- table 表格标签,配置表格使用、border="1" 添加表格框架 -->
    <table border="1">
         <!-- thead 设置表头 -->
        <thead>
            <!-- tr 指定表行标签-->
            <tr>
                <!-- th 设置表头内容,默认加粗-->
                <th>表头1</th>
                <th>表头2</th>
            </tr>
        </thead>
        <!-- tbody 设置表内容 -->
        <tbody>
            <!-- tr 指定报表行标签-->
            <tr>
                <!-- td 指定表列标签-->
                <td>1</td>
                <td>1</td>
            </tr>
            <tr>
                <td>2</td>
                <td>2</td>
            </tr>
        </tbody>
    </table>

    案例二

    <!-- table 表格标签,配置表格使用、border="1" 添加表格框架 -->
    <table border="1">
        <!-- thead 设置表头 -->
        <thead>
        <!-- tr 指定表行标签-->
            <tr>
                <!-- th 设置表头内容,默认加粗-->
                <th>表头1</th>
                <th>表头2</th>
                <th>表头3</th>
            </tr>
        </thead>
        <!-- tbody 设置表内容 -->
        <tbody>
            <tr>
                <!-- rowspan="2" 纵向 列 合并两个表格空间,等号后面是拼接数-->
                <td rowspan="2">1</td>
                <td>1</td>
                <td>1</td>
            </tr>
            <tr>
                <!-- rowspan="2" 横向 行 合并接两个表格空间,等号后面是拼接数-->
                <td colspan="2">1</td>
            </tr>
        </tbody>
    </table>

    效果:案例一


    表头1表头2
    1 1
    2 2

    效果:案例二


    表头1表头2表头3
    1 1 1
    1

  • 相关阅读:
    五、excel末尾补0和开头补0
    MYSQL查询前30条数据
    MYSQL数据库从A表把数据插入B表
    测试用例大全
    EXTJS 5.0 资料
    fs event_socket
    centos 编译swoole
    Valgrind简单用法
    linux 大并发下 内核优化
    FS拓展设置
  • 原文地址:https://www.cnblogs.com/xiangsikai/p/10402872.html
Copyright © 2011-2022 走看看