Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo
Working with the DOM

Book Description

The Document Object Model is the tree-like data structure that represents a web browser’s model of a web page. This lesson introduces the DOM, some DOM-specific terminology, and shows you how to use JavaScript to query, manipulate, and create DOM elements.

Why is it important?

Any use of JavaScript to manipulate pages requires understanding the DOM and the techniques available to accomplish common tasks, such as selecting specific elements or modifying the content of elements.

What you’ll learn—and how you can apply it

Learn what the Document Object Model is and how to use JavaScript to select, manipulate, and create DOM elements.

This lesson is for you because…

  • You’re a web designer or new frontend developer who needs to understand how to manipulate web pages dynamically with JavaScript


  • Basic familiarity with HTML and JavaScript

Materials or downloads needed in advance

  • None