Producing web pages
* HTML CSS DHTML XHTML A to Z of tags        Accessibility          Design

11.2 Avoid deprecated features of W3C technologies

Beware deprecated features; this is a feature that the W3C wants to remove from the official standard but that has not yet become officially obsolete or removed. Even though they are part of the official standard, the W3C discourages the use of deprecated features. Browsers may not support them in future:

Consult the W3C list of HTML elements and attributes to see which are deprecated and don't use them.

For example, the <font> tag in HTML is a deprecated tag in HTML 4.0. The W3C suggest the following techniques for handling fonts:

  • Always specify a fallback generic font
  • Use the CSS font properties to control font characteristics instead of using deprecated tags and such as <font>, <basefont>, and attributes such as face and size
  • If you must use HTML tags to control font information, use <big> and <small>, which are not deprecated

Here are some recommended alternatives to other deprecated tags:

For these tag....

Use...

<applet>

The <object> tag

<basefont>, <center>, <font>, <s>, <strike> or <u>

Style sheets for these formatting effects

<dir> and <menu>

List tags <ul> or <ol> and style sheets to refine the formatting

<isindex>

An <input> tag within a <form>

<listing>, <plaintext> and <xmp>

The <pre> tag for fixed-width text