CNET también está disponible en español.

Ir a español

Don't show this again

HolidayBuyer's Guide
Internet

W3C seeks updated style sheets

The W3C gives Cascading Style Sheets 2 its official recommendation, aiming to make the Web quicker, more accessible, and better-looking.

A new style sheet recommendation is expected to make the Web quicker, more accessible, and better-looking.

The World Wide Web Consortium (W3C) standards body today gave Cascading Style Sheets 2 its official recommendation, putting its imprimatur on the first upgrade to style sheets since recommending the first version in December 1996.

"CSS2 allows designers to describe very rich presentations," said Hokon Lie, leader of the W3C's style sheets area. "For a visual user, it's going to become a more visual experience. For someone using speech synthesis, it's going to become a richer aural experience."

Cascading style sheets let Web designers separate style specifications--such as fonts, colors, and spacing--from content. Those specifications then can apply to dozens or even thousands of pages without having to be inserted each time. On the other hand, leaner, content-only Web pages make their way through the Web more quickly.

More flexibility with style also is expected to lessen designers' reliance on bulky .gifs, which currently are the most common means for delivering certain fonts, colors, and other textual characteristics.

CSS2 is backward-compatible with its predecessor and includes the following improvements:

  • Cross-media publishing means that Web developers can specify different styles for a document when it appears on the computer screen, when it is printed, and when a voice synthesizer reads it. For instance, using CSS2, a developer can make the page print in a smaller font than is used on the screen, or have a voice synthesizer read it in different pitches and volumes.

  • Support for XML, or extensible markup language. XML is a so-called metalanguage, which lets developers specify their own tags in addition to the standard HTML tags. Style sheets are necessary to tell browsers how they should execute these unfamiliar, custom tags.

  • Support for downloadable fonts lets developers link to Web-based font resources, thereby expanding the range of fonts at their disposal.

  • Positioning allows greater flexibility in juxtaposing text and images. With CSS2, for example, Web authors can layer text to overlap words. Authors also can position images anywhere on a page and float text around them.

    Much of what CSS2 achieves with positioning is already possible using standard HTML tables, but those tables are comparatively bulky and difficult for browser alternatives such as speech synthesizers to render.

  • Bidirectional text lets authors mix words in languages that read from right to left, such as Hebrew, with words in languages that read from left to right.

    Both W3C-recommended versions of cascading style sheets are written so that browsers that do not support them will ignore the sheets. Also, if the sheets are embedded within the document, browsers that do not support them will skip over the sheets.

    In addition to announcing the recommendation of CSS2, the W3C today released a set of tools to support implementation of CSS1. These include a test suite and a validator for checking both CSS1 coding and execution, and a set of core style sheets for developers to use with their own pages.

    W3C spokesperson Sally Khudairi said the tools would ease the task of implementing style sheets.

    "This is a great way to start using CSS much more quickly than you thought you could, without reading a bunch of books," said Khudairi. "Although we do have some good books."