HTML5 过时标签和属性
过时标签
下列元素在 HTML5 中不再可用,其功能可以通过 CSS 更好的处理:
| 标签(元素) | 描述 |
|---|---|
| <acronym> | 定义首字母缩写。 |
| <applet> | 定义嵌入的 applet。 |
| <basefont> | 定义页面基准字体。 |
| <big> | 定义大号文本。 |
| <center> | 定义居中文本。 |
| <dir> | 定义目录列表。 |
| <font> | 定义文本字体、尺寸和颜色。 |
| <frame> | 定义框架。 |
| <frameset> | 定义框架集。 |
| <isindex> | 定义单行输入字段。 |
| <noframes> | 定义不支持框架的替代内容。 |
| <s> | 定义加删除线的文本。 |
| <strike> | 定义加删除线的文本。 |
| <tt> | 定义打字机文本。 |
| <u> | 定义下划线文本。 |
过时属性
HTML5 中不再有 HTML4 中的外观属性,因为它们的功能可以通过 CSS 更好的处理。有些来自 HTML4 的属性不在允许出现在 HTML5 中,甚至它们已经被完全删除了。
下面的表格中是已经被移除的属性以及它们所影响的标签(元素)。其中一些属性已经被永久删除。
| 被移除的属性 | 所属元素 |
|---|---|
| rev | link, a |
| charset | link and a |
| shape | a |
| coords | a |
| longdesc | img and iframe. |
| target | link |
| nohref | area |
| profile | head |
| version | html |
| name | img |
| scheme | meta |
| archive | object |
| classid | object |
| codebase | object |
| codetype | object |
| declare | object |
| standby | object |
| valuetype | param |
| type | param |
| axis | td and t |
| abbr | td and t |
| scope | td |
| align | caption, iframe, img, input, object, legend, table, hr, div, h1, h2, h3, h4, h5, h6, p, col, colgroup, tbody, td, tfoot, th, thead and tr. |
| alink | body |
| link | body |
| vlink | body |
| text | body |
| background | body |
| bgcolor | table, tr, td, th and body. |
| border | table and object. |
| cellpadding | table |
| cellspacing | table |
| char | col, colgroup, tbody, td, tfoot, th, thead and tr. |
| charoff | col, colgroup, tbody, td, tfoot, th, thead and tr. |
| clear | br |
| compact | dl, menu, ol and ul. |
| frame | table |
| compact | dl, menu, ol and ul. |
| frame | table |
| frameborder | iframe |
| hspace | img and object. |
| vspace | img and object. |
| marginheight | iframe |
| marginwidth | iframe |
| noshade | hr |
| nowrap | td and th |
| rules | table |
| scrolling | iframe |
| size | hr |
| type | li, ol and ul. |
| valign | col, colgroup, tbody, td, tfoot, th, thead and tr |
| width | hr, table, td, th, col, colgroup and pre. |
上一篇: HTML5 标签参考
下一篇: HTML5 新标签