HTML and CSS Reference
In-Depth Information
that's what lets you change the style
of your pages. But being able to
choose what elements your styles
affect is crucially important for the
whole thing to work.
There's an introduction to
CSS in appendix C. If you didn't
know any CSS before picking
up this topic, you should read
that before proceeding.
What is CSS3?
CSS3 is the third major revision of the W3C CSS specification. Unlike the previous
two revisions, CSS3 is divided into modules—instead of being one, long docu-
ment like CSS1 and CSS2/2.1, there are currently more than 30 individual docu-
ments that are part of CSS3. These are all allowed to progress and mature at their
own rates; depending on the level of interest, some modules will progress to lev-
el 4 before the level-3 work is completed.
Like the term HTML5 , the term CSS3 is often given a wider definition than just
the specifications. Many of the features people consider to be CSS3 are actually
in CSS2.1.
CSS3 has many more tools for selecting elements, so you're better
equipped to keep your markup free from elements, classes, and IDs
that have no meaning and are only there to support styling. In the
next section, you'll see some common design problems and learn
how CSS3 selectors make solving these problems easy.
Choosing elements through their relationships
Here are screenshots of three popular websites, showing three differ-
ent but common design requirements.
Alternating table rows have a
different style.
Links to the current page or
section have a different style.
The first and last elements
have a different style.
Search WWH ::




Custom Search