Chapter 1. Introducing CSS

When you first began working with XHTML (We’re going to refer to XHTML in this book, but if you want to substitute “HTML” in your head, it’s fine with us; we’re not purists), you learned that you use it to define the structure of your Web page document, and to define the nature of each element of your page’s content. By adding markup to an element, you are telling the Web browser what that bit of content is. Markup is made up of tags, and tag names are enclosed in angle brackets. For example, you define a bit of text as a paragraph by surrounding it with the <p> and </p> tags, like so:

<p>Alpaca wool is prized for its beauty and softness.</p>

Marking up text into paragraphs provides some structure to the document, and ...

Get Styling Web Pages with CSS: Visual QuickProject Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.