← 9 The XHTML syntaxTable of contents11 IANA considerations →
  1. 10 Obsolete features
    1. 10.1 Obsolete but conforming features
    2. 10.2 Non-conforming features

10 Obsolete features

10.1 Obsolete but conforming features

Features listed in this section will trigger warnings in conformance checkers.

Authors should not specify a border attribute on an img element. If the attribute is present, its value must be the string "0". CSS should be used instead.

Authors should not specify a language attribute on a script element. If the attribute is present, its value must be an ASCII case-insensitive match for the string "JavaScript" and either the type attribute must be omitted or its value must be an ASCII case-insensitive match for the string "text/javascript". The attribute should be entirely omitted instead (with the value "JavaScript", it has no effect), or replaced with use of the type attribute.

Authors should not specify the name attribute on a elements. If the attribute is present, its value must not be the empty string and must neither be equal to the value of any of the IDs in the element's home subtree other than the element's own ID, if any, nor be equal to the value of any of the other name attributes on a elements in the element's home subtree. If this attribute is present and the element has an ID, then the attribute's value must be equal to the element's ID. In earlier versions of the language, this attribute was intended as a way to specify possible targets for fragment identifiers in URLs. The id attribute should be used instead.

In the HTML syntax, specifying a DOCTYPE that is an obsolete permitted DOCTYPE will also trigger a warning.

10.2 Non-conforming features

Elements in the following list are entirely obsolete, and must not be used by authors:

applet

Use embed or object instead.

acronym

Use abbr instead.

bgsound

Use audio instead.

dir

Use ul instead.

frame
frameset
noframes

Either use iframe and CSS instead, or use server-side includes to generate complete pages with the various invariant parts merged in.

isindex

Use an explicit form and text field combination instead.

listing

Use pre and code instead.

nextid

Use GUIDs instead.

noembed

Use object instead of embed when fallback is necessary.

plaintext

Use the "text/plain" MIME type instead.

rb

Providing the ruby base directly inside the ruby element is sufficient; the rb element is unnecessary. Omit it altogether.

strike

Use del instead if the element is marking an edit, otherwise use s instead.

xmp

Use code instead, and escape "<" and "&" characters as "&lt;" and "&amp;" respectively.

basefont
big
blink
center
font
marquee
multicol
nobr
spacer
tt

Use appropriate elements and/or CSS instead.

Where the tt element would have been used for marking up keyboard input, consider the kbd element; for variables, consider the var element; for computer code, consider the code element; and for computer output, consider the samp element.

Similarly, if the big element is being used to denote a heading, consider using the h1 element; if it is being used for marking up important passages, consider the strong element; and if it is being used for highlighting text for reference purposes, consider the mark element.

See also the text-level semantics usage summary for more suggestions with examples.


The following attributes are obsolete (though the elements are still part of the language), and must not be used by authors:

charset on a elements
charset on link elements

Use an HTTP Content-Type header on the linked resource instead.

coords on a elements
shape on a elements

Use area instead of a for image maps.

methods on a elements
methods on link elements

Use the HTTP OPTIONS feature instead.

name on a elements (except as noted in the previous section)
name on embed elements
name on img elements
name on option elements

Use the id attribute instead.

rev on a elements
rev on link elements

Use the rel attribute instead, with an opposite term. (For example, instead of rev="made", use rel="author".)

urn on a elements
urn on link elements

Specify the preferred persistent identifier using the href attribute instead.

nohref on area elements

Omitting the href attribute is sufficient; the nohref attribute is unnecessary. Omit it altogether.

profile on head elements

When used for declaring which meta terms are used in the document, unnecessary; omit it altogether, and register the names.

When used for triggering specific user agent behaviors: use a link element instead.

version on html elements

Unnecessary. Omit it altogether.

usemap on input elements

Use img instead of input for image maps.

longdesc on iframe elements
longdesc on img elements

Use a regular a element to link to the description, or (in the case of images) use an image map to provide a link from the image to the image's description.

lowsrc on img elements

Use a progressive JPEG image (given in the src attribute), instead of using two separate images.

target on link elements

Unnecessary. Omit it altogether.

scheme on meta elements

Use only one scheme per field, or make the scheme declaration part of the value.

archive on object elements
classid on object elements
code on object elements
codebase on object elements
codetype on object elements

Use the data and type attributes to invoke plugins. To set parameters with these names in particular, the param element can be used.

declare on object elements

Repeat the object element completely each time the resource is to be reused.

standby on object elements

Optimize the linked resource so that it loads quickly or, at least, incrementally.

type on param elements
valuetype on param elements

Use the name and value attributes without declaring value types.

language on script elements (except as noted in the previous section)

Use the type attribute instead.

event on script elements
for on script elements

Use DOM Events mechanisms to register event listeners. [DOMEVENTS]

datapagesize on table elements

Unnecessary. Omit it altogether.

summary on table elements

Use one of the techniques for describing tables given in the table section instead.

abbr on td and th elements

Use text that begins in an unambiguous and terse manner, and include any more elaborate text after that. The title attribute can also be useful in including more detailed text, so that the cell's contents can be made terse.

axis on td and th elements

Use the scope attribute on the relevant th.

datasrc on a, applet, button, div, frame, iframe, img, input, label, legend, marquee, object, option, select, span, table, and textarea elements
datafld on a, applet, button, div, fieldset, frame, iframe, img, input, label, legend, marquee, object, param, select, span, and textarea elements
dataformatas on button, div, input, label, legend, marquee, object, option, select, span, and table elements

Use script and a mechanism such as XMLHttpRequest to populate the page dynamically. [XHR]

alink on body elements
bgcolor on body elements
link on body elements
marginbottom on body elements
marginheight on body elements
marginleft on body elements
marginright on body elements
margintop on body elements
marginwidth on body elements
text on body elements
vlink on body elements
clear on br elements
align on caption elements
align on col elements
char on col elements
charoff on col elements
valign on col elements
width on col elements
align on div elements
compact on dl elements
align on embed elements
hspace on embed elements
vspace on embed elements
align on hr elements
color on hr elements
noshade on hr elements
size on hr elements
width on hr elements
align on h1h6 elements
align on iframe elements
allowtransparency on iframe elements
frameborder on iframe elements
hspace on iframe elements
marginheight on iframe elements
marginwidth on iframe elements
scrolling on iframe elements
vspace on iframe elements
align on input elements
hspace on input elements
vspace on input elements
align on img elements
border on img elements (except as noted in the previous section)
hspace on img elements
vspace on img elements
align on legend elements
type on li elements
compact on menu elements
align on object elements
border on object elements
hspace on object elements
vspace on object elements
compact on ol elements
align on p elements
width on pre elements
align on table elements
bgcolor on table elements
cellpadding on table elements
cellspacing on table elements
frame on table elements
rules on table elements
width on table elements
align on tbody, thead, and tfoot elements
char on tbody, thead, and tfoot elements
charoff on tbody, thead, and tfoot elements
valign on tbody, thead, and tfoot elements
align on td and th elements
bgcolor on td and th elements
char on td and th elements
charoff on td and th elements
height on td and th elements
nowrap on td and th elements
valign on td and th elements
width on td and th elements
align on tr elements
bgcolor on tr elements
char on tr elements
charoff on tr elements
valign on tr elements
compact on ul elements
type on ul elements
background on body, table, thead, tbody, tfoot, tr, td, and th elements

Use CSS instead.


The border attribute on the table element can be used to provide basic fallback styling for the purpose of making tables legible in browsing environments where CSS support is limited or absent, such as text-based browsers, WYSIWYG editors, and in situations where CSS support is disabled or the style sheet is lost. Only the empty string and the value "1" may be used as border values for this purpose. Other values are considered obsolete. To regulate the thickness of such borders, authors should instead use CSS.

The align, alt, archive, code, height, hspace, name, object, vspace, and width IDL attributes must reflect the respective content attributes of the same name. For the purposes of reflection, the applet element's object content attribute is defined as containing a URL.

The codeBase IDL attribute must reflect the codebase content attribute, which for the purposes of reflection is defined as containing a URL.

The behavior, direction, height, hspace, vspace, and width IDL attributes must reflect the respective content attributes of the same name.

The bgColor IDL attribute must reflect the bgcolor content attribute.

The scrollAmount IDL attribute must reflect the scrollamount content attribute. The default value is 6.

The scrollDelay IDL attribute must reflect the scrolldelay content attribute. The default value is 85.

The trueSpeed IDL attribute must reflect the truespeed content attribute.

The cols and rows IDL attributes of the frameset element must reflect the respective content attributes of the same name.

The name, scrolling, and src IDL attributes of the frame element must reflect the respective content attributes of the same name.

The frameBorder IDL attribute of the frame element must reflect the element's frameborder content attribute.

The longDesc IDL attribute of the frame element must reflect the element's longdesc content attribute, which for the purposes of reflection is defined as containing a URL.

The marginHeight IDL attribute of the frame element must reflect the element's marginheight content attribute.

The marginWidth IDL attribute of the frame element must reflect the element's marginwidth content attribute.

The noResize IDL attribute of the frame element must reflect the element's noresize content attribute.

The coords, charset, name, rev, and shape IDL attributes of the a element must reflect the respective content attributes of the same name.

The noHref IDL attribute of the area element must reflect the element's nohref content attribute.

The color, face, and size IDL attributes of the basefont element must reflect the respective content attributes of the same name.

The text IDL attribute of the body element must reflect the element's text content attribute.

The bgColor IDL attribute of the body element must reflect the element's bgcolor content attribute.

The background IDL attribute of the body element must reflect the element's background content attribute. (The background content is not defined to contain a URL, despite rules regarding its handling in the rendering section above.)

The link IDL attribute of the body element must reflect the element's link content attribute.

The aLink IDL attribute of the body element must reflect the element's alink content attribute.

The vLink IDL attribute of the body element must reflect the element's vlink content attribute.

The clear IDL attribute of the br element must reflect the content attribute of the same name.

The align IDL attribute of the caption element must reflect the content attribute of the same name.

The align and width IDL attributes of the col element must reflect the respective content attributes of the same name.

The ch IDL attribute of the col element must reflect the element's char content attribute.

The chOff IDL attribute of the col element must reflect the element's charoff content attribute.

The vAlign IDL attribute of the col element must reflect the element's valign content attribute.

The compact IDL attribute of the dir element must reflect the content attribute of the same name.

The align IDL attribute of the div element must reflect the content attribute of the same name.

The compact IDL attribute of the dl element must reflect the content attribute of the same name.

The name and align IDL attributes of the embed element must reflect the respective content attributes of the same name.

The color, face, and size IDL attributes of the font element must reflect the respective content attributes of the same name.

The align IDL attribute of the h1h6 elements must reflect the content attribute of the same name.

The align, color, size, and width IDL attributes of the hr element must reflect the respective content attributes of the same name.

The noShade IDL attribute of the hr element must reflect the element's noshade content attribute.

The version IDL attribute of the html element must reflect the content attribute of the same name.

The align and scrolling IDL attributes of the iframe element must reflect the respective content attributes of the same name.

The frameBorder IDL attribute of the iframe element must reflect the element's frameborder content attribute.

The longDesc IDL attribute of the iframe element must reflect the element's longdesc content attribute, which for the purposes of reflection is defined as containing a URL.

The marginHeight IDL attribute of the iframe element must reflect the element's marginheight content attribute.

The marginWidth IDL attribute of the iframe element must reflect the element's marginwidth content attribute.

The name, align, border, hspace, and vspace IDL attributes of the img element must reflect the respective content attributes of the same name.

The longDesc IDL attribute of the img element must reflect the element's longdesc content attribute, which for the purposes of reflection is defined as containing a URL.

The align IDL attribute of the input element must reflect the content attribute of the same name.

The useMap IDL attribute of the input element must reflect the element's usemap content attribute.

The align IDL attribute of the legend element must reflect the content attribute of the same name.

The type IDL attribute of the li element must reflect the content attribute of the same name.

The charset, rev, and target IDL attributes of the link element must reflect the respective content attributes of the same name.

The compact IDL attribute of the menu element must reflect the content attribute of the same name.

The scheme IDL attribute of the meta element must reflect the content attribute of the same name.

The align, archive, border, code, declare, hspace, standby, and vspace IDL attributes of the object element must reflect the respective content attributes of the same name.

The codeBase IDL attribute of the object element must reflect the element's codebase content attribute, which for the purposes of reflection is defined as containing a URL.

The codeType IDL attribute of the object element must reflect the element's codetype content attribute.

The compact IDL attribute of the ol element must reflect the content attribute of the same name.

The align IDL attribute of the p element must reflect the content attribute of the same name.

The type IDL attribute of the param element must reflect the content attribute of the same name.

The valueType IDL attribute of the param element must reflect the element's valuetype content attribute.

The width IDL attribute of the pre element must reflect the content attribute of the same name.

The align, frame, summary, rules, and width, IDL attributes of the table element must reflect the respective content attributes of the same name.

The bgColor IDL attribute of the table element must reflect the element's bgcolor content attribute.

The cellPadding IDL attribute of the table element must reflect the element's cellpadding content attribute.

The cellSpacing IDL attribute of the table element must reflect the element's cellspacing content attribute.

The align IDL attribute of the tbody, thead, and tfoot elements must reflect the content attribute of the same name.

The ch IDL attribute of the tbody, thead, and tfoot elements must reflect the elements' char content attributes.

The chOff IDL attribute of the tbody, thead, and tfoot elements must reflect the elements' charoff content attributes.

The vAlign IDL attribute of the tbody, thead, and tfoot element must reflect the elements' valign content attributes.

The abbr, align, axis, height, and width IDL attributes of the td and th elements must reflect the respective content attributes of the same name.

The bgColor IDL attribute of the td and th elements must reflect the elements' bgcolor content attributes.

The ch IDL attribute of the td and th elements must reflect the elements' char content attributes.

The chOff IDL attribute of the td and th elements must reflect the elements' charoff content attributes.

The noWrap IDL attribute of the td and th elements must reflect the elements' nowrap content attributes.

The vAlign IDL attribute of the td and th element must reflect the elements' valign content attributes.

The align IDL attribute of the tr element must reflect the content attribute of the same name.

The bgColor IDL attribute of the tr element must reflect the element's bgcolor content attribute.

The ch IDL attribute of the tr element must reflect the element's char content attribute.

The chOff IDL attribute of the tr element must reflect the element's charoff content attribute.

The vAlign IDL attribute of the tr element must reflect the element's valign content attribute.

The compact and type IDL attributes of the ul element must reflect the respective content attributes of the same name.

The attributes of the Document object listed in the first column of the following table must reflect the content attribute on the body element with the name given in the corresponding cell in the second column on the same row, if the body element is a body element (as opposed to a frameset element). When there is no body element or if it is a frameset element, the attributes must instead return the empty string on getting and do nothing on setting.