HTML and CSS Reference
C H A P T E R 6
In this chapter, we'll diverge for the most part from HTML into a totally different lan-
guage and specification. It's time for Cascading Style Sheets (CSS). CSS may not be
HTML, but HTML is not much to look at without CSS, so mastery of one necessitates
some degree of mastery of the other.
Since this topic is about HTML, we'll spend most of our time in this chapter examining
the relationship between HTML and CSS and how the two interact, but we'll explore
purely CSS topics as well. The CSS specification is currently in its third iteration, so we'll
run through the necessary core CSS concepts you should know and then dive into the de-
tails of what is new. There's a bit of technical jargon to cover, but in doing so, we'll set the
stage for our exploration of the possibilities of page design. From a usability standpoint,
these aspects can be just as important as the semantics of your markup.
The present state: CSS2.1
CSS is broken into levels, which are versions of the specification analogous to the W3C
versions of HTML (HTML 3.2, HTML 4.01, HTML5, and so on). The current stable and
complete level is CSS level 2 revision 1, otherwise known as CSS2.1. Documents deve-
loped by the W3C go through stages of review that are used to identify the stability of a
particular specification ( Table 6-1 ).