Part 5

Formatting with CSS

Early forms of HTML paid very little attention to the visual aspects of page layout. The original plan was for HTML to be more tied to the meaning of page elements rather than their display. In the very early days of the Web, this was fine, but soon people wanted far more sophisticated design elements than HTML was capable of producing. Browser manufacturers responded by adding vendor-specific tags that added new capabilities but greatly complicated development efforts.

HTML5 is an attempt to return HTML to its earlier simplicity. All the tags that were once used to directly manage the appearance of the page (tags like <font>, <center>, <b>, and <i>) are removed. Rather than having special tags indicate formatting, a new language has been devised that can provide very powerful formatting features to virtually any HTML/XHTML tag. CSS (Cascading Style Sheets) is this language.

tip.eps This part is a review of CSS as it currently stands. If you’re already familiar with CSS technology, feel free to skip this part. However, if you need a review of the current state of the art, you’re in the right place. The CSS described here works on all major browsers. Part 6 describes the new CSS features available as part of HTML5.

Remember.eps Be sure to check out my Web site for working ...

Get HTML5 For Dummies® Quick Reference 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.