Deprecated HTML Elements


ATTENTION: THIS PAGE IS Valid HTML 5 AND IS BEST VIEWED WITH HTML 5 - Please upgrade your browser or download one of the HTML 5 compatible browsers such as Mozilla Firefox, Chrome, Opera or IE 9 (March 14, 2011 or later). For more information see HTML 5 browsers.

If you find this helpful, please click the Google +1 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.)

PDF mobile

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.

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 and marginwidth attributes of the <body> tag
  • the align, border, controls, dynsrc, hspace, loop, start and vspace 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 &nbsp; should be avoided. The decimal entity &#160; or hexadecimal &#xa0; should be used instead.
  • The character sequence ]]> should be avoided unless it indicates the end of a CDATA section.

Valid HTML 5