CHAPTER 5

image

Style Sheets

A golden rule in web site standardization is to separate content from appearance. External style sheets should be preferred to inline styles except when only a small portion of a web page is styled. The syntax and naming convention of external style sheets and the style attribute values are slightly different. To achieve the highest code quality, the style sheets must be valid (error-free), and optimized in terms of scope, inheritance, and declaration order.

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

Get Web Standards:Mastering HTML5, CSS3, and XML, Second Edition 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.