What’s New in CSS2

As of this writing, the current specification published by the W3C is Cascading Style Sheets, Level 2 (http://www.w3.org/TR/REC-CSS2/). CSS2 expands significantly on the work done in CSS1. Not surprisingly, it includes dozens of new properties (and pseudo-elements), and a fair number of additional values for existing properties (see the following tables).

CSS2 incorporates and refines the set of properties used for positioning to give designers more control over page layout and DHTML authors the ability to create dynamic motion effects.

It provides more controls over traditional typesetting elements such as widows, orphans, and page breaks. This shows that style sheets are being developed with a mind to developing documents for both HTML display and print output.

CSS2 also introduces properties that give additional control over table element presentation.

As part of the W3C’s efforts to make web pages accessible to all users, the latest style sheet specification includes a number of new properties that pertain to the nonvisual display of web pages. These new attributes provide controls for speech-delivery and sound controls.

The following list of new CSS2 elements was compiled and graciously contributed to this book by CSS-guru Eric Meyer. It reflects the state of the final CSS2 specification, which was made a W3C Recommendation in May 1998.

New Selectors

The following are the new CSS2 selectors:

Selector

Description

 

*

Matches any element.

Example: *{font-family:serif;} ...

Get Web Design in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.