HTML and CSS Reference
In-Depth Information
The specifi cations for CSS are maintained by the World Wide Web Consortium
(W3C); and as with HTML and XHTML, several versions of CSS exist with varying levels
of browser support. The fi rst version of CSS, called CSS1 , was introduced in 1996 and
enabled Web designers to create styles to:
• Set the font size, type, and other properties of Web page text
• Control text alignment and apply decorative elements such as underlining, italic, and
capitalization
• Specify background and foreground colors of different page elements
• Apply a background image to any element
• Set the margins, internal space, and borders of grouping elements such as paragraphs
and headings
CSS1 made it possible to create Web pages that had visually interesting and attractive
designs and layouts. The second version of CSS, CSS2 , was introduced in 1998, expand-
ing the language to provide styles to:
• Position elements at specifi c locations on a page
• Clip and hide element content
• Design styles for different output devices, including printed media and aural devices
• Control the appearance and behavior of browser features such as scroll bars and
mouse cursors
An update to CSS2, CSS 2.1 , was introduced by the W3C in April 2002. Although
the update did not add any new features to the language, it cleaned up minor errors
that were introduced in the original specifi cation. At the time of this writing, almost all
aspects of CSS2 are supported by current browsers.
As browsers were implementing all of the features of CSS2, in December 2005 the
W3C pressed forward to the next version, CSS3 , which further expanded the design tools
available to Web page authors. Currently still in a working draft, CSS3 adds styles for:
• Enhanced text effects, including drop shadows and Web fonts
• Semi-transparent colors and overlays
• Column-based layout
• Rounded borders, drop shadows, and box outlines
• Transformations of page elements, including scaling, skewing, and rotation
With CSS, as with HTML, Web page designers need to be aware of compatibility
issues that arise not just among different versions of the language, but also among dif-
ferent versions of the same browser. Although it's tempting to always apply the latest
and most exciting features of CSS, you should not create a situation where users of older
browsers will not be able to view your Web pages.
Browser Extensions
Not content to wait for the W3C's fi nal specifi cations, several browser manufacturers are
creating their own extensions to the CSS language. Many of these extensions have been
incorporated in the CSS3 specifi cation. By putting forward their own extensions, these
vendors are able to test and debug new styles that are still in the development stage with
CSS3. You can use these browser extensions as long as you realize that they might not
be supported by other browsers and you do not make their use crucial to your page's
readability.
Search WWH ::




Custom Search