C H A P T E R  5

Style Sheets

A golden rule in web site standardization is to separate content from appearance. XHTML elements eliminate style attributes. Style sheets should be provided in external files. Style definitions provided in CSS have similar features to the ones applied in older HTML documents as inline styles. However, naming conventions and additional mechanisms are often confusing. Beyond code validity, there are other features such as scope, property value inheritance, and the order of separators, which should also be considered to obtain optimized CSS files.

In this chapter, you will learn frequently used standards for styling web sites, including general CSS grammar rules and selector syntaxes that are vital for every web site. ...

Get Web Standards: Mastering HTML5, CSS3, and XML now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.