Curriculum
Course: JavaScript Basic
Login

Curriculum

JavaScript Basic

JSHome

0/216
Text lesson

DOM Intro

With the HTML DOM, JavaScript can interact with and modify any element of an HTML document.

The HTML DOM (Document Object Model)

When a web page loads, the browser generates a Document Object Model (DOM) of the page, which is structured as a tree of objects.

The HTML DOM Tree of Objects

DOM 1

The object model gives JavaScript the ability to create dynamic HTML by:

  • Modifying all HTML elements on the page
  • Altering any HTML attributes in the page
  • Changing the CSS styles applied to the page
  • Removing existing HTML elements and attributes
  • Adding new HTML elements and attributes
  • Responding to all existing HTML events on the page
  • Creating new HTML events on the page