HTML and CSS Reference
In-Depth Information
will likely produce the most good, because obtaining consensus among browser vendors to
handle markup problems in a consistent manner is a more likely path to an improved Web
than defining some strict syntax and then attempting to educate document authors around
the world en masse to write good markup.
HTML5's aim to bring order to the chaos of sloppy markup is but one of the grand
aims of the specification. It also aims to replace traditional HTML, XHTML, and DOM
specifications, and to do so in a backward-compatible fashion. In its attempt to do this, the
specification is sprawling, addressing not just what elements exist but how they are used
and scripted. HTML5 embraces the fact that the Web not only is composed of documents
but also supports applications, thus markup must acknowledge and facilitate the building
of such applications. More of the philosophy of HTML5 will be discussed later in the
chapter when addressing some strong opinions, myths, and misconceptions surrounding
the specification; for now, take a look at what markup features HTML5 actually changes.
Presentational Markup Removed and Redefined
HTML5 removes a number of elements and attributes. Many of the elements are removed
because they are more presentational than semantic. Table 2-1 presents the elements
currently scheduled for removal from HTML5.
N OTE Although these elements are removed from the specification and should be avoided in favor of
CSS, they likely will continue to be supported by browsers for some time to come. The specification
even acknowledges this fact.
Looking at Table 2-1, you might notice that some elements that apparently should be
eliminated somehow live on. For example, <small> continues to be allowed, but <big> is
obsolete. The idea here is to preserve elements but shift meaning. For example, <small> is
no longer intended to correspond to text that is just reduced in size, similar to <font
size="-1"> or <span style="font-size: smaller;"> , but instead is intended to
represent the use of small text, such as appears in fine print or legal information. If you
think this decision seems a bit preposterous, join the crowd. Some of the other changes to
element meaning seem even a bit more preposterous, such as the claim that a <b> tag now
represents inline text that is stylistically offset from standard text, typically using a different
Removed HTML Element CSS Equivalent
body {font-family: family ; font-size: size ;}
font-size: larger
text-align: center or margin: auto depending on context
font-family , font-size , or font
<s>, <strike>
text-decoration: strike
font-family: monospace
text-decoration: underline
T ABLE 2-1 HTML 4 Elements Removed from HTML5
Search WWH ::

Custom Search