Deprecated tags and attributes are parts of the HTML standard code which use is no longer recommended. This happens because HTML standard is updated from time to time (e.g., from version 3.0 to 4.0) and some tags or characteristics of the language are added and others are removed or deprecated. By this, HTML authors are provided with more tools when a new element or attribute is added, and they are also recommended to discard those than have been replaced or became useless. The decision about use or not deprecated tags and/or attributes is left to each author consideration. Many browsers give support to deprecated elements, but in a future this may change. The general recommendation is to try other ways to achieve their effects.
Deprecated tags in HTML 4.01 are easily identified. Below is a list of the ten deprecated tags:
Tags deprecated in favor of Style Sheets:
Deprecated attributes varies from tag to tag. Most of them are presentational attributes and have been deprecated in favor of style sheets. This means that the same effect can be achieved by the use of the "id", "style" or "class" attributes in conjunction with style sheets. In the examples below we define two pieces of code that will be rendered exactly the same way, but using different methods.
Deprecated example using the HTML font tag:
Example using the "style" attribute:
Example using classes defined with the HTML style tag:
For more information about Cascade Style Sheets, please consult our Cascade Style Sheets tutorial.