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

Get Beginning HTML5 and CSS3 For Dummies 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.