下列元素在 HTML5 中不再可用,其功能可以通過(guò) CSS 更好的處理:
| 標(biāo)簽(元素) | 描述 |
|---|---|
| <acronym> | 定義首字母縮寫。 |
| <applet> | 定義嵌入的 applet。 |
| <basefont> | 定義頁(yè)面基準(zhǔn)字體。 |
| <big> | 定義大號(hào)文本。 |
| <center> | 定義居中文本。 |
| <dir> | 定義目錄列表。 |
| <font> | 定義文本字體、尺寸和顏色。 |
| <frame> | 定義框架。 |
| <frameset> | 定義框架集。 |
| <isindex> | 定義單行輸入字段。 |
| <noframes> | 定義不支持框架的替代內(nèi)容。 |
| <s> | 定義加刪除線的文本。 |
| <strike> | 定義加刪除線的文本。 |
| <tt> | 定義打字機(jī)文本。 |
| <u> | 定義下劃線文本。 |
HTML5 中不再有 HTML4 中的外觀屬性,因?yàn)樗鼈兊墓δ芸梢酝ㄟ^(guò) CSS 更好的處理。有些來(lái)自 HTML4 的屬性不在允許出現(xiàn)在 HTML5 中,甚至它們已經(jīng)被完全刪除了。
下面的表格中是已經(jīng)被移除的屬性以及它們所影響的標(biāo)簽(元素)。其中一些屬性已經(jīng)被永久刪除。
| 被移除的屬性 | 所屬元素 |
|---|---|
| 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. |