HTML and CSS Reference
In-Depth Information
The most arguable elements are i and b that are not deprecated and can be used in every XHTML version
to create italic and bold texts, respectively. However, they are purely presentational elements without structural
meaning. Although most user agents render the appropriate structural elements ( em and strong ) similarly if not
identically to the i and b basic character formatting elements, em and strong are preferred.
As a general rule, use the XHTML 1.0 Strict elements and attributes only, and if you author XHTML5, extend the
markup with the new XHTML5 elements and attributes where needed.
Avoid Deprecated Attributes
Several HTML attributes are deprecated in XHTML in favor of other attributes or style sheets (see Table 3-6 ).
Table 3-6. Attributes Deprecated in XHTML
Attribute
Deprecated in Favor of
alink
Style sheets
align
Style sheets
background
Style sheets
border
Style sheets
color
Style sheets
compact
Style sheets
face
Style sheets
height
Style sheets
language
type attribute
link
Style sheets
name
id attribute
noshade
Style sheets
nowrap
Style sheets
size
Style sheets
start
Style sheets
text
Style sheets
type
Style sheets
value
Style sheets
version
DTDs
vlink
Style sheets
width 8
Style sheets
8 It is deprecated on certain elements only (e.g., cannot be used on td , but allowed on img ).
 
 
Search WWH ::




Custom Search