7. Style Sheet Building Blocks

While (X)HTML gives your Web pages their basic structure, CSS (Cascading Style Sheets) defines their 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 such basic formatting as font size and color, layout properties such as positioning and float, and print controls for deciding where page breaks should appear. CSS also has a number of dynamic properties, which allow items to appear and disappear and are useful for creating drop-down menus and other interactive components.

While there are various versions of CSS, the version that is best supported, ...

Get HTML, XHTML, & CSS, Sixth Edition: Visual QuickStart Guide 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.