O'Reilly logo

Sams Teach Yourself JavaScript™ in 24 Hours, Fifth Edition by Phil Ballard, Michael Moncur

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

Hour 13. JavaScript and CSS

What You’ll Learn in This Hour

• Separating style from content

• The DOM style property

• Retrieving styles

• Setting styles

• Accessing classes using className

• The DOM styleSheet object

• Enabling, disabling, and switching stylesheets in JavaScript

• Changing the mouse cursor

In the early days of the World Wide Web, pages were all about their text content. Early browsers had rudimentary support for graphic effects—some didn’t even support images. Styling a web page was largely a matter of using the few style-related attributes and tags allowed by the early incarnations of HTML.

Things improved markedly with the introduction of browser support for Cascading Style Sheets (CSS), which allowed the styling of a page ...

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