O'Reilly logo

DOM Scripting: Web Design with JavaScript and the Document Object Model, Second Edition by Jeffrey Sambells, Jeremy Keith

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

Chapter 9. CSS-DOM

What this chapter covers:

  • Introducing the style property

  • How to retrieve style information

  • How to change styles

In this chapter, the presentation layer and the behavior layer will meet head-on. You'll see how the DOM can be used to get and set styles by reading and writing CSS.

Three sheets to the Web

Content on the Web can be wrapped up in three successive layers that web browsers can read:

  • Structure

  • Presentation

  • Behavior

Structure

First and foremost, the structural layer is created with a markup language, such as HTML or XHTML. The tags, or words contained in angle brackets, describe the semantic meaning of content. For example, the <p> tag conveys the information, "This content is a paragraph." But the tag doesn't include any information ...

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