What are the HTML tags that deprecated in HTML5 ?
In this article, we will see the various deprecated Html tags & their alternative tags in HTML5. Deprecated tags are those tags that are allowed, but not recommended for use and are being replaced by newer ones. The tag or attributes depreciated when the same attributes are achieved in some other way. Several reasons for being discarded & uses the newer one:
- There are several tags that help to achieve the same task. For this reason, the length of the source code is also reduced & hence improve the overall performance.
- Managing the large size code will be difficult & modifying such a source code will not be possible at once. This can increase the time for development as well as ambiguity in the code.
- Sometimes, it might happen if we need to use a particular block of code to perform a specific task then we may need to re-write the code again. All these factors help to increase the complexity as well as the development time which is not worth the development process.
For this, several tags & attributes were introduced in HTML5. Here is a complete list of deprecated tags are discussed below.
HTML 5 Deprecated Tag: Complete list of deprecated tags are given below.
TAGS |
DESCRIPTIONS |
ALTERNATIVE TAGS |
---|---|---|
<basefont> | To Specify a basefont. | font style sheets. |
<font> | It specifies font text, size and color. | font-family, font-size, color. |
<center> | It specifies a centered Text. | text-align:center. |
<strike> | It specifies a strike-through text. | text-decoration. |
<big> | Defines big text. | Use CSS properties or Heading tags. |
<dir> | It specifies a directory list. | ul tag. |
<isindex> | It specifies a single-line input field. | form tag. |
<applet> | It specifies an applet. | object tag. |
<acronym> | An acronym is defined using this tag. | Use abbr. |
<noframe> | It is used to define a noframe section. | Either use an iframe and CSS instead or use server-side include to generate complete pages with the various invariant parts merged in. |
<xmp> | Renders text between the start and end tags without interpreting the HTML in between and using a monospaced font. | Use pre and code instead. |
<noembed> | A tag makes it easy to supply alternative content that tells users what they are missing. | Use object instead of embed when fallback is necessary. |
<plaintext> | It is used to render all text in the document exactly as it was typed in. | Use the “text/plain” MIME type instead. |
<frameset> | It specifies a set of frames. | Either use iframe and CSS instead or use server-side include to generate complete pages with the various invariant parts merged in. |
<frame> | It specifies a frame. | Either use iframe and CSS instead or use server-side include to generate complete pages with the various invariant parts merged in. |
<u> | It specifies an underlined text. | text-decoration. |
<tt> | Defines teletype text. | Use CSS properties. |
<s> | Specify a strike-through text. | text-decoration. |
HTML Deprecated Attributes: Several tag attributes are also removed. Following is the table having removed attributed and their corresponding impacted tags (elements) ie. elements from which those attributes have been removed permanently.
REMOVED ATTRIBUTES |
TAGS IMPACTED |
ALTERNATIVES |
---|---|---|
rev | a, link |
Use the rel attribute. |
longdesc | img, iframe |
Use a regular element to link to the description. |
version | Html |
Unnecessary, not required to mention. |
charset | a, link |
Use an HTTP Content-Type header on the linked resource instead. |
name | a, img |
Use the id attribute instead. |
nohref | area |
Omitting the href attribute is sufficient. The nohref attribute is unnecessary, not required to mention. |
usemap | input |
Use img instead of input for image maps. |
target | link |
Unnecessary, not required to mention. |
scheme | meta |
Use only one scheme per field, or make the scheme declaration part of the value. |
codetype | object |
Use the data and type attributes to invoke plugins. |
declare | object |
Repeat the object element completely each time the resource is to be reused. |
standby | object |
Optimise the linked resource so that it loads quickly or, at least, incrementally. |
valuetype | param |
Without declaring value types, use name and value attributes. |
language | script |
Use the type attribute. |
abbr | td, th |
Use text that begins in an unambiguous and terse manner, and include any more elaborate text after that. |
axis | td, th |
Scope attribute should be used. |