语言小结
  • program-language-note
  • contact
  • common
    • 代码风格
    • 概念语法
      • 类型
      • 注释
      • 字符
      • 语句
      • 操作符
      • 函数
        • 递归
    • 格式化参数
    • 源码结构
    • 数据结构
    • 名词
  • 电路
    • 内存地址
    • Untitled
    • Code
  • C
    • note
    • overview
      • helloworld.c
      • c标准
      • 关键字
      • tips
      • util.c
    • 语法
      • 函数
        • main
      • const
      • static
      • 作用域
    • 编译和运行
      • c代码内存模型
      • 预处理
        • include
        • define
    • 头文件
    • 基本数据类型
      • 整型
      • 枚举
      • 浮点型
      • 指针
      • 数组
      • 结构和联合
    • 指针&数组、指针&函数
    • API
    • 存储结构
    • 操作符
      • sizeof
    • typedef
    • 输入输出
    • 格式化参数
    • 左値右値
    • 性能思考
    • volatile
    • 字符串
      • find_char.c
    • 动态分配
      • alloc.h
      • alloc.c
      • alloc_usage.c
    • note
  • cpp
    • 资源
    • note
    • 数据结构
    • 智能指针
    • 编译过程
  • shell
    • usage
    • Untitled
  • Rust
    • overview
  • Lisp
    • Untitled
  • web
    • overview
      • index
      • 软件工具
      • ARIA规范
      • SEO
    • style
    • html
      • 标签、元素
        • 标签快记
        • 联系信息
        • 引用
        • 列表
        • 语言设置
        • meta
      • 页面结构
        • 图片
        • 视频
        • 引用css、js文件
      • 等价字符
      • 链接
        • 邮件
      • 表单
        • note
      • 表格
    • css
      • 字体
      • 布局
        • position
        • float
        • display
        • flexbox
    • js
    • note
  • java
    • note
    • java语言程序设计
    • 设计模式
      • 大话设计模式-吴强-2010
      • 大话设计模式-程杰
      • 设计模式-gof
      • 设计模式解析
      • 原则
      • 单例
    • java程序设计第10版-基础
    • java程序设计第10版-进阶
    • java核心技术第9版-I
    • jar包
    • 安全
    • 反射
  • python
    • note
    • index
    • 个人记忆点
    • 疑惑
    • simple
    • 精通Python爬虫框架scrapy
    • 语法
    • scrapy
      • notice
      • index
  • 汇编
    • Untitled
  • kotlin
    • index
    • note
    • by android
      • note
      • index
  • groovy
    • gradle
Powered by GitBook
On this page

Was this helpful?

  1. web
  2. html

表格

最好还是不要使用嵌套表格,会降低可访问性。

<table>
    <colgroup>
        <col style="background-color: yellow">
    </colgroup>
    <caption>Dinosaurs in the Jurassic period</caption>

    <!-- scope和id都可以用来准确标识行列,大部分情况下用scope就行,id实在太麻烦 -->
    <thead>
        <tr>
            <th scope="col">&nbsp;</th>
            <th scope="colgroup" colspan="4">Ella</th>
        </tr>
        <tr>
            <th scope="col">&nbsp;</th>
            <th scope="col">Knocky</th>
            <th scope="col">Flor</th>
            <th scope="col">Ella</th>
            <th scope="col">Juan</th>
        </tr>
        <tr>
            <th scope="col">&nbsp;</th>
            <th id="purchase">Purchase</th>
            <th id="location">Location</th>
            <th id="date">Date</th>
            <th id="evaluation">Evaluation</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <th scope="row">Juan</th>
            <td>Hi, I'm your first cell.</td>
            <td>I'm your third cell.</td>
            <td>I'm your fourth cell.</td>
            <td id="nested">
                <table id="table2">
                    <tr>
                        <td>cell1</td>
                        <td>cell2</td>
                        <td>cell3</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <th id="juan">Juan</th>
            <td id="purchase juan">Hi, I'm your first cell.</td>
            <td id="location juan">I'm your third cell.</td>
            <td id="date juan">I'm your fourth cell.</td>
        </tr>
    </tbody>
    <tfoot>
        <th>Juan</th>
        <td>Hi, I'm your first cell.</td>
        <td>I'm your second cell.</td>
        <td>I'm your third cell.</td>
        <td>I'm your fourth cell.</td>
    </tfoot>
</table>
PreviousnoteNextcss

Last updated 5 years ago

Was this helpful?