13
Using Different Kinds of Style Sheets
In This Chapter
Using inline styles
Styling a page with the <style> element
Using external style sheets
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:
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.
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access