Deprecated Attributes
A large number of attributes are deprecated in HTML 4.0, primarily
due to the preference given to style sheets over direct content
formatting. Browsers will continue to honor these deprecated
attributes for a long time to come, but if you eventually design
content exclusively for browsers that are HTML 4.0 compatible, you
should use that project as a starting point for weaning yourself from
these deprecated attributes. Table 7.4 lists all
the deprecated attributes in HTML 4.0, plus the affected elements and
suggested replacement syntax. In some instances, you will see a
deprecated attribute associated with a new element (like the
deprecated ALIGN
attribute of the new
IFRAME
element). This is not a trick. You can
still use the “old” attribute with a new element for the
sake of authoring-style compatibility.
Table 7-4. Deprecated Attributes in HTML 4.0
Attribute |
Elements |
Supplanted By |
---|---|---|
ALIGN |
CAPTION, APPLET, IFRAME, IMG, INPUT, OBJECT, LEGEND, TABLE, HR, DIV, H1-H6, P |
|
ALINK |
BODY |
|
ALT |
APPLET |
|
ARCHIVE |
APPLET |
|
BACKGROUND |
BODY |
|
BGCOLOR |
BODY, TABLE, TD, TH, TR |
|
BORDER |
IMG, OBJECT |
|
CLEAR |
BR |
|
CODE |
APPLET |
|
CODEBASE |
APPLET |
|
COLOR |
Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.