html5 tbody,<tbody>

这个 HTML 标签

元素在一个

Permitted content

Zero or more

elements.

Tag omission

The 

element is not a required child element for a parent 

Permitted parents

Within the required parent

Permitted ARIA roles

Any

Attributes

This element includes the global attributes.

align in HTML 4.01, in

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 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

If this attribute is not set, the left value is assumed.

Note:Do not use this attribute as it is obsolete (not supported) in the latest standard.

To achieve the same effect as the left, center, right or justify values, use the CSS text-align property on it.

To achieve the same effect as the char value, in CSS3, you can use the value of the text-align property 未实现.

bgcolor

This attribute defines the background color of each cell of the column. It is one of the 6-digit hexadecimal code as defined in sRGB, prefixed by a '#'. One of the sixteen predefined color strings may be used:

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"

Usage note:Do not use this attribute, as it is non-standard and only implemented some versions of Microsoft Internet Explorer: the

element should be styled using CSS. To give a similar effect to the bgcolor attribute, use the CSS property background-color, on the relevant or elements.

char in HTML 4.01, in

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. If char, this attribute is ignored.

Note:Do not use this attribute as it is obsolete (and not supported) in the latest standard. To achieve the same effect as the text-align property 未实现.

charoff in HTML 4.01, in

This attribute is used to indicate the number of characters to offset the column data from the alignment characters specified by the char attribute.

Note:Do not use this attribute as it is obsolete (and not supported) in the latest standard.

valign in HTML 4.01, in

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 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;

and top, 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 CSS vertical-align property on it.

Usage notes

In conjunction with a preceding and/or

element, the element provides additional semantic information for devices such as printers and displays.

Of the parent table's child elements,

represents the content which, when longer than a page, will most likely differ for each page printed; while the content of and will be the same or similar for each page printed.

For displays,

will enable separate scrolling of the , , and elements of the same parent

Unlike the ,

, and elements, multiple elements are permitted (if consecutive), allowing the rows in long tables to be divided into different sections, each separately formatted as needed.

Examples

Please see the

Specifications

Browser compatibility

Feature

Chrome

Edge

Firefox (Gecko)

Internet Explorer

Opera

Safari

Basic support

1.0

(Yes)

1.0 (1.7 or earlier)

(Yes)

(Yes)

(Yes)

align/valign attribute

1.0

(Yes)

未实现 [1]

(Yes)

(Yes)

(Yes)

char/charoff attribute

1.0

(Yes)

未实现 [2]

(Yes)

(Yes)

(Yes)

bgcolor attribute

未实现

未实现

未实现

(Yes)

未实现

未实现

Feature

Android

Edge

Firefox Mobile (Gecko)

IE Mobile

Opera Mobile

Safari Mobile

Basic support

(Yes)

(Yes)

1.0 (1.0)

(Yes)

(Yes)

(Yes)

align/valign attribute

?

(Yes)

未实现 [1]

?

?

?

char/charoff attribute

?

(Yes)

未实现 [2]

?

?

?

bgcolor attribute

未实现

未实现

未实现

(Yes)

未实现

未实现

[1] See bug 915.

[2] See bug 2212.

See also

CSS properties and pseudo-classes that may be specially useful to style the

element:

the :nth-child pseudo-class to set the alignment on the cells of the column;

the text-align property to align all cells content on the same character, like '.'.

这篇文章有帮助吗?

谢谢!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值