8. Working with Style Sheets

In This Chapter

Creating an External Style Sheet

Linking to External Style Sheets

Creating an Embedded Style Sheet

Applying Inline Styles

The Importance of Location

Using Media-Specific Style Sheets

Offering Alternate Style Sheets

The Inspiration of Others: CSS

Before you start defining your style sheets, it’s important to know how to create and use the files that will contain them. In this chapter, you’ll learn how to create a style sheet file and then how to apply CSS to multiple Web pages (including a whole site), a single page, or an individual HTML element. You achieve these via three methods: external style sheets (the preferred choice), embedded style sheets, and inline styles (the least desirable).

You’ll ...

Get HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition now with O’Reilly online learning.

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