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 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.