While introducing new tags, HTML5 discards many common elements, which are roughly divided into the following categories: Class 1: Phenotype Elements
- Basefont // defines the default font color, font size, and font series for all texts in the document. Only Internet Explorer supports this feature.
- Big // displays the bold text effect.
- Center // has been defined using css.
- Font // usage: <font size = "3" color = "red"> This is some text! </Font>, but it is no longer used.
- S // used to define the added/deleted text definition.
- Strike // The abbreviation above.
- Tt // used to present text effects similar to typewriter or width.
- U // used to define the underline.
As we can see, what can be defined in css today should not be defined in the html structure, so that the representation and structure are separated. Therefore, we recommend that you replace them with elements with the correct semantics, and use CSS to ensure the rendering effect.
Category 2: framework elements
Because the framework has many availability and accessibility issues, HTML5 standards remove the following elements.
- Frame
- Frameset
- Noframes // defines alternative content for users who do not support the framework.
But html5 supports iframe, and iframe is still widely used.
Category 3: attribute
Many phenotype attributes are also removed by the new specification, as shown below:
- Align // not in html Structure
- Link, vlink, alink, and text attributes on the body Tag
- Bgcolor
- Height and width
- The scrolling attribute on the iframe element // used to determine whether a scroll bar is displayed in the iframe.
- Valign // used to set the vertical alignment of rows
- Hspace and vspace
- Cellpadding, cellspacing, and border attributes on table labels
- Profile attribute on the header label
- Longdesc attributes of img and iframe elements
Category 4: Others
- Abbr replaces acronym (abbreviated)
- Object replaces applet // embedded media
- Ul has replaced dir // and now uses ul, dl, and ol as the top list.