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 |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access