Chapter 3. Understanding Cascading Style Sheets

WHAT YOU’LL LEARN IN THIS CHAPTER:

• How to create a basic style sheet

• How to use style classes

• How to use style IDs

• How to construct internal style sheets and inline styles

In the previous chapter, you learned the basics of HTML and XHTML, including how to set up a skeletal HTML template for all your web content. In this chapter, you will learn how to fine-tune the display of your web content using Cascading Style Sheets (CSS).

The concept behind style sheets is simple: You create a style sheet document that specifies the fonts, colors, spacing, and other characteristics that establish a unique look for a website. You then link every page that should have that look to the style sheet, ...

Get Sams Teach Yourself HTML, CSS and JavaScript All in One 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.