O'Reilly logo

HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition by Bruce Hyslop, Elizabeth Castro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required