O'Reilly logo

HTML5 Programming with JavaScript For Dummies by John Paul Mueller

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 11

Understanding the Document Object Model

In This Chapter

arrow Understanding the Document Object Model (DOM)

arrow Interacting with various HTML elements

arrow Using events to your advantage

arrow Changing the page appearance with styles

arrow Creating and using nodes to affect structure

The Document Object Model (DOM) is the means of interaction between JavaScript and HTML5. While HTML5 provides the user interface, JavaScript provides the back-end logic used to make that interface react to user input. The two can’t work well without each other. In fact, many of the examples in this book already rely on the DOM in order to provide basic output. You can’t interact directly with an HTML5 tag, change the structure of a page, or modify the appearance of the content without interacting with the DOM in some way.

The DOM has multiple levels that you’ll encounter in this chapter. The deepest layer is content in the form of text or objects. There are the tags (HTML) that define the interpretation of certain ...

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