XHTML5 and HTML 4.01 differences

Source: Internet
Author: User

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
  • Pixels
  • %
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
  • Pixels
  • %
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.