image

© Risto Viita/Shutterstock

chapter11

Using the Document Object Model

A WEBPAGE CONSISTS OF many types of objects: paragraphs, headings, images, lists, tables, and more. To manage the items that make up a webpage, browsers do not work in terms of individual HTML tags but, rather, objects. The Document Object Model (DOM) defines the structure of a webpage in terms of objects. DOM is important beyond the developers who write the code that implements browsers, such as Internet Explorer and Google Chrome. Using JavaScript, any webpage developer can use DOM to access individual page components to create dynamic page content that may change based on ...

Get Introduction to Web Development Using HTML 5 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.