HOUR 12:Working with Style Sheets

What You’ll Learn in This Hour:

• Why style sheets are needed

• How to define Cascading Style Sheets (CSS)

• How to use a style sheet in a document

• Using an external style sheet file

• Using JavaScript to change styles dynamically

This hour begins with an introduction to style sheets, which you can use to take more control over how the browser displays your document. You can also use JavaScript with style sheets to change the appearance of a page dynamically.

Style and Substance

If you’ve ever tried to make a really good-looking web page, you’ve probably encountered some problems. First of all, HTML doesn’t give you very much control over a page’s appearance. For example, you ...

Get Sams Teach Yourself JavaScript in 24 Hours 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.