HTML
<tfoot>
element
defines a set of rows summarizing the columns of the table.
| 内容类别 | None. |
|---|---|
| 准许内容 |
Zero or more
<tr>
元素。
|
| Tag omission |
The start tag is mandatory. The end tag may be omitted if there is no more content in the parent
<table>
元素。
|
| Permitted parents |
A
<table>
element. The
<tfoot>
must appear after any
<caption>
,
<colgroup>
,
<thead>
,
<tbody>
,或
<tr>
element. Note that this is the requirement as of HTML5.
HTML 4
<tfoot>
element cannot be placed after any
<tbody>
and
<tr>
element. Note that this directly contradicts the above normative requirement from HTML5.
|
| Implicit ARIA role |
rowgroup
|
| Permitted ARIA roles | 任何 |
| DOM 接口 |
HTMLTableSectionElement
|
此元素包括 全局属性 .
align
Deprecated since
HTML4
Obsolete since
HTML5
left
, aligning the content to the left of the cell
center
, centering the content in the cell
right
, aligning the content to the right of the cell
justify
, inserting spaces into the textual content so that the content is justified in the cell
char
, aligning the textual content on a special character with a minimal offset, defined by the
char
and
charoff
属性
Unimplemented (see
bug 2212
)
.
If this attribute is not set, the
left
value is assumed.
left
,
center
,
right
or
justify
values, use the CSS
text-align
property on it.
char
value, in CSS3, you can use the value of the
char
as the value of the
text-align
property
Unimplemented
.
bgcolor
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"
|
<tfoot>
element should be styled using
CSS
. To give a similar effect to the
bgcolor
attribute, use the
CSS
property
background-color
, on the relevant
<td>
or
<th>
元素。
char
Deprecated since
HTML4
Obsolete since
HTML5
align
is not set to
char
, this attribute is ignored.
注意:
Do not use this attribute as it is obsolete (and not supported) in the latest standard. To achieve the same effect as the
char
, in CSS3, you can use the character set using the
char
attribute as the value of the
text-align
property
Unimplemented
.
charoff
Deprecated since
HTML4
Obsolete since
HTML5
valign
Deprecated since
HTML4
Obsolete since
HTML5
baseline
, which will put the text as close to the bottom of the cell as it is possible, but align it on the
baseline
of the characters instead of the bottom of them. If characters are all of the size, this has the same effect as
bottom
.
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;
top
, which will put the text as close to the top of the cell as it is possible.
vertical-align
property on it.
请参阅
<table>
page for examples on
<tfoot>
.
| 规范 | 状态 | 注释 |
|---|---|---|
|
HTML 实时标准
The definition of 'tfoot element' in that specification. |
实时标准 | |
|
HTML5
The definition of 'tfoot element' in that specification. |
推荐 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
tfoot
|
Chrome 完整支持 1 | Edge 完整支持 12 | Firefox 完整支持 1 | IE 完整支持 Yes | Opera 完整支持 Yes | Safari 完整支持 Yes | WebView Android 完整支持 Yes | Chrome Android 完整支持 Yes | Firefox Android 完整支持 4 | Opera Android 完整支持 Yes | Safari iOS 完整支持 Yes | Samsung Internet Android 完整支持 Yes |
align
弃用
|
Chrome ? | Edge 完整支持 12 |
Firefox
不支持
No
注意事项
|
IE 完整支持 Yes | Opera ? | Safari ? | WebView Android ? | Chrome Android ? |
Firefox Android
不支持
No
注意事项
|
Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
bgcolor
弃用
|
Chrome ? | Edge ? | Firefox 不支持 No | IE 完整支持 Yes | Opera ? | Safari ? | WebView Android ? | Chrome Android ? | Firefox Android 不支持 No | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
char
弃用
|
Chrome ? | Edge 完整支持 12 |
Firefox
不支持
No
注意事项
|
IE 完整支持 Yes | Opera ? | Safari ? | WebView Android ? | Chrome Android ? |
Firefox Android
不支持
No
注意事项
|
Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
charoff
弃用
|
Chrome ? | Edge 完整支持 12 |
Firefox
不支持
No
注意事项
|
IE 完整支持 Yes | Opera ? | Safari ? | WebView Android ? | Chrome Android ? |
Firefox Android
不支持
No
注意事项
|
Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
valign
弃用
|
Chrome ? | Edge 完整支持 12 |
Firefox
不支持
No
注意事项
|
IE 完整支持 Yes | Opera ? | Safari ? | WebView Android ? | Chrome Android ? |
Firefox Android
不支持
No
注意事项
|
Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
完整支持
不支持
兼容性未知
弃用。不要用于新网站。
见实现注意事项。
<caption>
,
<col>
,
<colgroup>
,
<table>
,
<tbody>
,
<td>
,
<th>
,
<thead>
,
<tr>
;
<tfoot>
元素:
:nth-child
pseudo-class to set the alignment on the cells of the column;
text-align
property to align all cells content on the same character, like '.'.