HTML and CSS Reference
In-Depth Information
Introduction to CSS
In the past, much of the visual formatting of Web pages was supplied by markup
elements, squarely mixing the concepts of logical and physical markup into the mess
that is classic HTML. Strict variants of (X)HTML deprecated the elements and attributes
that focused on presentation, providing a clear distinction between the structure provided
by markup and the look dictated by a style sheet written in Cascading Style Sheets (CSS)
syntax. The distinct division of duties between markup and style can provide numerous
production, maintenance, and even performance benefits, making it a far superior
presentation solution to markup alone.
Presentational HTML
Traditionally, for right or wrong, markup has been used for formatting. For example, many
HTML elements support the align attribute, which provides simple support for text
alignment. Combine these aspects of markup with the assumption of visual rendering, such
as the belief that h1 elements always should make text big, and it would actually seem clear
to some that HTML is meant for formatting, as demonstrated here:
<h1 align="center"> Big Centered Text! </h1>
Now an argument can be made about the semantic value of the h1 specifying a
headline, but for those solely coming at HTML from a point of view of knowing what a tag
does, the idea that an <h1> tag makes something big wins out. Yet, beyond such
misunderstandings based upon observation rather than the intent of the specification, there
are elements that are strictly presentational, like font , which is part of HTML 3.2, 4.01
transitional, and XHTML 1.0 transitional specifications:
<font size="7" color="red"> I am big and red! </font>
Further, when looking at browser-specific elements, plenty of presentational markup
can be found. For example, the following markup
<blink> Proprietary HTML Tag Sale: 50% Off for Firefox Users! </blink>
Search WWH ::

Custom Search