O'Reilly logo

Beginning HTML5 and CSS3 For Dummies by Chris Minnick, Ed Tittel

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

13

Using Different Kinds of Style Sheets

In This Chapter

arrow Using inline styles

arrow Styling a page with the <style> element

arrow Using external style sheets

arrow Styling a site with external style sheets

When you finish creating your style rules, you’re ready to connect them to your HTML page by using one of these options:

check.png Insert style information into your document. You can either

• Use the style attribute to add style information directly to a tag.

This is an inline style.

• Use the <style> element to build a style sheet into a web page.

This is an internal style sheet.

check.png Use an external style sheet. You can either

• Use the <link> tag to link your web page to an external style sheet.

• Use the CSS @import statement to import an external style sheet into the web page.

Applying Inline Styles

Each element in an HTML document has a special, optional attribute named style. Web page authors use the ...

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