当前位置:首页>-表格中的行-html5表格内容

-表格中的行-html5表格内容

  • 更新时间 2025-07-22 13:54:04

HTML

元素定义表格中的行。它们可以是和元素的组合。

浏览器支持

所有浏览器都支持

示例

cell a cell b
内容分类允许的内容标签省略元素紧随其后,或者父表组(或)元素不再具有任何内容,则可以省略End标记、允许的父元素标签定义表格中的行。

HTML 4.01 与 HTML 5 之间的差异

在 HTML 5 中,不支持

标签的任何属性。

实例

一个简单的 HTML 表格,包含两列两行:

None
零个或多个or元素,或它们的混合
开始标记是必填项。如果该
,,or允许的ARIA角色DOM接口
任意
HTMLTableRowElement

属性

表格标签支持全局特性。还有一些过期的特性,你应该避免使用它们,但是可以了解它们,会在你阅读旧代码的时候有所帮助。

  • alignTHML5中废弃,THML5中废弃
  • This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:
    • left, aligning the content to the left of the cells
    • center, centering the content in the cells
    • right, aligning the content to the right of the cells
    • justify, widening the spaces in the textual content so that the content is justified in the cells
    • char, aligning the textual content on a special character with a minimal offset, defined by thecharandcharoffattributes未实现(查看bug2212)

    If this attribute is not set, the parent node's value is inherited.

    THML5中废弃。此功能已过时。尽量避免使用它。
  • charTHML5中废弃,THML5中废弃
  • This attribute is used to set the character to align the cells in a column on. Typical values for this include a period(.)when attempting to align numbers or monetary values.Ifalignis not set tochar, this attribute is ignored.THML5中废弃。此功能已过时。尽量避免使用它。
  • valignTHML5中废弃,THML5中废弃
  • This attribute specifies the vertical alignment of the text within each row of cells of the table header. Possible values for this attribute are:
    • baseline, which will put the text as close to the bottom of the cell as it is possible, but align it on thebaselineof the characters instead of the bottom of them. If characters are all of the size, this has the same effect asbottom.
    • bottom, which will put the text as close to the bottom of the cell as it is possible;
    • middle, which will center the text in the cell;
    • andtop, which will put the text as close to the top of the cell as it is possible.
    Note:Do not use this attribute as it is obsolete(and not supported)in the latest standard: instead set the CSSvertical-alignproperty on it.

定义和用法

monthsavings
january$100

-表格中的行-html5表格内容

最新文章

随机文章