3.1 CSS DECLARATIONS

The hierarchy of applying CSS styles work on an HTML page. An HTML page can have multiple styles. A style sheet document in turn can apply to multiple HTML pages as well. That is the advantage—styles can be uniformly applied as well as specifically controlled—a unique combination of centralized as well as a de-centralized approach to applying styles to documents.

Returning to the hierarchy of styles, an HTML document can have multiple styles or CSS documents, associated; each CSS document can have multiple style declarations; each declaration consists of a Rule. A Rule consists of a Selector and a set of name-value pairs.

Figure 3.1 shows how CSS Declarations are applied as styles to HTML. Each CSS Declaration takes the following ...

Get Web Technology: Theory and Practice 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.