In HTML 4.01, the TD element's "bgcolor", "height", "width", and "nowrap" are not approved for use.
In HTML 5, only the "colspan" and "rowspan" properties are supported.
Properties |
value |
Description |
4 |
5 |
Abbr |
Abbr_text |
An abbreviated version of the content in the specified cell. Not supported. |
4 |
|
Align |
- Left
- Right
- Center
- Justify
- Char
|
Specifies how the contents of the cell are arranged horizontally. Not supported. Please use CSS instead. |
4 |
|
Axis |
Category_names |
Define a name for the cell. Not supported. |
4 |
|
BgColor |
- RGB (X,X,X)
- #xxxxxx
- ColorName
|
Specifies the background color of the cell. Not supported. Please use CSS instead. |
4 |
|
Char |
Character |
Specifies which character to align the text with. Not supported. Please use CSS instead. |
4 |
|
Charoff |
|
Specifies the first offset to the alignment. Not supported. Please use CSS instead. |
4 |
|
colspan |
Number |
Specifies the number of columns that this cell can span. |
4 |
5 |
Headers |
Header_cells ' _id |
A space-delimited list of cell IDs. Not supported. |
4 |
|
Height |
Pixels |
Specifies the height of the table cell. Not supported. Please use CSS instead. |
4 |
|
NoWrap |
NoWrap |
Whether to disable or enable text wrapping in cells. Not supported. Please use CSS instead. |
4 |
|
RowSpan |
Number |
Specifies the number of rows that this cell can span. |
4 |
5 |
Scope |
- Col
- Colgroup
- Row
- Rowgroup
|
Specifies whether this cell provides header information for the remainder of the row that contains this cell, the remainder of the column that contains this cell (COL), the remainder of the row group (Rowgroup) that contains the cell, and the remainder of the column group (Colgroup) that contains the cell. Not supported. |
4 |
|
valign |
- Top
- Middle
- Bottom
- Baseline
|
Specifies how the contents of the cell are arranged vertically. Not supported. Please use CSS instead. |
4 |
|
Width |
|
Specifies the width of the table cell. Not supported. Please use CSS instead. |
4 |
Cases:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
>
<
meta
http-equiv
=
"Content-Type"
content
=
"text/html; charset=gb2312"
/>
<
title
>Test</
title
>
</
head
>
<
body
>
<
table
style
=
"width:500px;"
border
=
"1px"
>
<
tr
>
<
td
style
=
"width:100px;"
></
td
>
<
td
>the</
td
>
<
td
>the beautiful</
td
>
<
td
>the beautiful girl</
td
>
<
td
></
td
>
</
tr
>
</
table
>
</
body
>
</
html
>
XHTML5 and HTML 4.01 differences