7. CSS Building Blocks

In This Chapter

Constructing a Style Rule

Adding Comments to Style Rules

The Cascade: When Rules Collide

A Property’s Value

Whereas HTML defines your content’s meaning and gives your Web pages their basic structure, CSS (Cascading Style Sheets) defines the appearance.

A style sheet is simply a text file that contains one or more rules that determine—through properties and values—how certain elements in your Web page should be displayed. There are CSS properties for controlling basic formatting such as font size and color, layout properties such as positioning and float, and print controls such as deciding where page breaks should appear when visitors print a page. CSS also has a number of dynamic properties that allow items ...

Get HTML5 and CSS3: Visual QuickStart Guide, Seventh 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.