Discarded Element)
The elements listed in this section will not be used in html5. you can use some alternative solutions to upgrade existing documents to html5. For example, the parser section can process the isindex element.
The reason why the following elements are deprecated is that CSS processing can better replace them:
- Basefont
- Big
- Center
- Font
- Strike
- Tt
The following elements are deprecated because their use destroys usability and accessibility:
- Frame
- Frameset
- Noframes
The reason why the following elements are deprecated is that they are not often used, which can also cause confusion. Other elements can also implement their functions well:
- Acronym is discarded because it often causes page disorder and can be replaced by abbr.
- The applet is discarded because it can be replaced by an object.
- Isindex is discarded because it is replaced by a Form Control.
- Dir is discarded because ul is used instead.
Finally, the noscript element can only be used in HTML, but not in XML.
Discarded Attribute)
Some attributes in HTML4 are no longer allowed to be used in html5. the specification details how to deal with existing documents, and these attributes cannot be used in new documents in the future, because they are marked as invalid attributes.
HTML5 specifications have alternative solutions for these attributes. Click to access them.
ID |
Corresponding Element |
Attribute name |
01 |
Link, |
Rev, charset |
02 |
A |
Shape, coords |
03 |
Img, iframe |
Longdesc |
04 |
Link |
Target |
05 |
Area |
Nohref |
06 |
Head |
Profile |
07 |
Html |
Version |
08 |
Img |
Name |
09 |
Meta |
Scheme |
10 |
Object |
Archive, classid, codebase, codetype, declare, standby |
11 |
Param |
Valuetype, type |
12 |
Td, th |
Axis, abbr |
13 |
Td |
Scope |
14 |
Table |
Summary |
In addition, in HTML5, the visual attributes of the following elements will also be discarded, because these functions can be implemented using CSS:
ID |
Corresponding Element |
Attribute name |
01 |
Caption, iframe, img, input, object, legend, table, hr, div, h1, h2, h3, h4, h5, h6, p, col, colgroup, tbody, td, tfoot, th, thead, tr |
Align |
02 |
Body |
Alink, link, text, vlink |
03 |
Body |
Background |
04 |
Table, tr, td, th, body |
Bgcolor |
05 |
Object |
Border |
06 |
Table |
Cellpadding, cellspacing |
07 |
Col, colgroup, tbody, td, tfoot, th, thead, tr |
Char, charoff |
08 |
Br |
Clear |
09 |
Dl, menu, ol, ul |
Compact |
10 |
Table |
Frame |
11 |
Iframe |
Frameborder |
12 |
Td, th |
Height |
13 |
Img, object |
Hspace, vspace |
14 |
Iframe |
Marginheight, marginwidth |
15 |
Hr |
Noshade |
16 |
Td, th |
Nowrap |
17 |
Table |
Rules |
18 |
Iframe |
Scrolling |
19 |
Hr |
Size |
20 |
Li, ol, ul |
Type |
21 |
Col, colgroup, tbody, td, tfoot, th, thead, tr |
Valign |
22 |
Hr, table, td, th, col, colgroup, pre |
Width |