目录 搜索
Attributes accesskey (attribute) class (attribute) contenteditable (attribute) contextmenu (attribute) data-* (attribute) dir (attribute) draggable (attribute) dropzone (attribute) Global attributes hidden (attribute) id (attribute) itemid (attribute) itemprop (attribute) itemref (attribute) itemscope (attribute) itemtype (attribute) lang (attribute) slot (attribute) spellcheck (attribute) style (attribute) tabindex (attribute) title (attribute) translate (attribute) Elements a abbr address area article aside audio b base bdi bdo blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 head header hr html i iframe img input input type="button" input type="checkbox" input type="color" input type="date" input type="datetime"-local input type="email" input type="file" input type="hidden" input type="image" input type="month" input type="number" input type="password" input type="radio" input type="range" input type="reset" input type="search" input type="submit" input type="tel" input type="text" input type="time" input type="url" input type="week" ins kbd label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt rtc ruby s samp script section select slot small source span strong style sub summary sup table tbody td template textarea tfoot th thead time title tr track u ul var video wbr Miscellaneous Attributes Block-level elements CORS enabled image CORS settings attributes Element Inline elements Kinds of HTML content Link types Microdata Optimizing your pages for speculative parsing Preloading content Reference Supported media formats Using the application cache Obsolete acronym applet basefont big blink center command content dir element font frame frameset hgroup image input type="datetime" isindex keygen listing marquee nextid noframes plaintext strike tt xmp
文字

内容类别

None。

允许的内容

零个或多个<tr>元素。

标签省略

开始标记是强制性的。如果父<table>元素中没有更多内容,则可以省略结束标记。

允许的父级

一个<table>元素。<tfoot>必须出现在任何<caption>,<colgroup>,<thead>,<tbody>或<tr>元素之后。请注意,这是HTML5的要求。HTML 4 <tfoot>元素不能放在任何<tbody>和<tr>元素之后。请注意,这与HTML5的上述规范要求直接抵触。

允许的 ARIA 角色

任何

DOM 接口

HTMLTableSectionElement

属性

该元素包含全局属性。

align  在 HTML 4 中,在 HTML5 中此枚举属性指定如何处理每个单元格内容的水平对齐。可能的值是:

  • left,将内容对齐到单元格的左侧

  • center,将内容集中在单元格中

  • right,将内容对齐到单元格的右侧

  • justify,在文本内容中插入空格以便内容在单元格中合理

  • char,将特殊字符上的文本内容与最小偏移值进行对齐,由“ 未实现” char和“ charoff属性” 定义。

如果未设置此属性,left则假定该值。

注意:不要使用此属性,因为它在最新标准中已过时(不支持)。

  • 为了实现作为同样的效果leftcenterrightjustify值,使用 CSS text-align就可以了财产。

  • 为了达到与char CSS3 中的值相同的效果,可以使用值的值char作为text-align未实现属性的值。

bgcolor该属性定义了列的每个单元格的背景颜色。它是 sRGB 中定义的6位十六进制代码之一,以'#'为前缀。可以使用十六个预定义颜色字符串中的一个:


black = "#000000"


green = "#008000"


silver = "#C0C0C0"


lime = "#00FF00"


gray = "#808080"


olive = "#808000"


white = "#FFFFFF"


yellow = "#FFFF00"


maroon = "#800000"


navy = "#000080"


red = "#FF0000"


blue = "#0000FF"


purple = "#800080"


teal = "#008080"


fuchsia = "#FF00FF"


aqua = "#00FFFF"

使用说明:不要使用此属性,因为它是非标准的,只实现了某些版本的 Microsoft Internet Explorer:该<tfoot>元素应使用 CSS 进行样式化。为了给 bgcolor 属性提供类似的效果,请在相关<td><th>元素上使用 CSS 属性 background-color

char  在 HTML 4 中,在 HTML5 中此属性用于设置字符以对齐列上的单元格。典型值包括尝试对齐数字或货币值时的句点(。)。如果align未设置char,则忽略此属性。

注意:不要使用此属性,因为它在最新标准中已过时(并且不受支持)。为了达到与char CSS3 中相同的效果,可以使用字符集char作为text-align属性 Unimplemented 的值。

charoff  在 HTML 4 中,在 HTML5 中此属性用于指示用来从 char 属性指定的对齐字符中偏移列数据的字符数

注意:不要使用此属性,因为它在最新标准中已过时(并且不受支持)。

valign  在 HTML 4 中,在 HTML5 中此属性指定表格标题的每行单元格内文本的垂直对齐方式。此属性的可能值为:

  • baseline,它会将文本尽可能靠近单元格的底部,但将其对齐到字符的基线而不是底部。如果字符的大小都是一样的话,这和效果相同bottom

  • bottom,这将使文本尽可能靠近单元格的底部;

  • middle,它将文本居中在单元格中;

  • 并且top,这将使文本尽可能靠近单元格的顶部。

注意:不要使用此属性,因为它在最新标准中已经过时(并且不受支持):请改为vertical-align在其上设置 CSS 属性。

例子

请参阅<table>页面上的示例<tfoot>

规范

Specification

Status

Comment

HTML Living StandardThe definition of 'tfoot element' in that specification.

Living Standard


HTML5The definition of 'tfoot element' in that specification.

Recommendation


浏览器兼容性

Feature

Chrome

Edge

Firefox

Internet Explorer

Opera

Safari

Basic Support

1

(Yes)

1

(Yes)

(Yes)

(Yes)

align

?

(Yes)

No1

(Yes)

?

?

bgcolor

?

No

No

(Yes)

?

?

char

?

(Yes)

No2

(Yes)

?

?

charoff

?

(Yes)

No2

(Yes)

?

?

valign

?

(Yes)

No1

(Yes)

?

?

Feature

Android

Chrome for Android

Edge mobile

Firefox for Android

IE mobile

Opera Android

iOS Safari

Basic Support

(Yes)

(Yes)

(Yes)

1

(Yes)

(Yes)

(Yes)

align

?

?

(Yes)

No1

(Yes)

?

?

bgcolor

?

?

No

No

(Yes)

?

?

char

?

?

(Yes)

No2

(Yes)

?

?

charoff

?

?

(Yes)

No2

(Yes)

?

?

valign

?

?

(Yes)

No1

(Yes)

?

?

上一篇: 下一篇: