If you find this helpful, please click the Google Button to the left, if it is white, to make it turn blue or red. Thank you! (It also helps find this page again more easily.) |
Obsolete and Deprecated HTML Tags and Attributes
There are a number of tags and attributes which have been deprecated in HTML 5 or earlier versions which may still work in some browsers. For backward compatibility with existing documents, the HTML specifications may even require that these deprecated elements and attributes continue to be supported by HTML 5 compliant browsers and document processors. However, when creating web documents conforming to the HTML 5 specifications, authors should avoid these deprecated HTML tags.
The HTML 5 Cheat Sheet is a handy reference for converting to HTML 5 from HTML 4 or XHTML. It shows the deprecated HTML tags in a strike-through font, and also highlights new tags in HTML 5.
Here is a list of deprecated HTML tags to avoid using. Click on the links to get more details including valid HTML code that should be used instead.
<a name>
or<a id>
withouthref
<acronym>
tag<applet>
tag<bgsound>
tag<center>
tag<dir>
tag<fn>
footnote tag<font>
and<basefont>
tags<frameset>
,<frame>
and<noframes>
tags- inline style tags:
<big>
,<blink>
,<strike>
,<tt>
and<u>
<isindex>
tag<layer>
,<ilayer>
and<nolayer>
tags<listing>
tag<marquee>
tag<nobr>
tag<noembed>
tag<noscript>
tag<plaintext>
tag<spacer>
tag<xml>
tag<xmp>
tag
For an easy reference for both obsolete HTML tags and valid HTML tags, see the HTML Cheat Sheet.
Deprecated attributes in HTML 5
In addition, the following deprecated attributes are no longer included in the HTML 5 specification. Therefore, the following list of attributes should be avoided:
onreset
event attribute- the
marginheight
andmarginwidth
attributes of the <body> tag - the
align
,border
,controls
,dynsrc
,hspace
,loop
,start
andvspace
attributes of the <img> tag - the
language
attribute of the <script> tag
Other things to avoid in HTML
Here are some other things that should be avoided when coding HTML documents:
- The named non-breaking space HTML entity
should be avoided. The decimal entity 
or hexadecimal 
should be used instead. - The character sequence
]]>
should be avoided unless it indicates the end of a CDATA section.