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 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.