What the DOM Covers

In this lesson we will see what exactly the DOM covers. Let's begin!

In the DOM Basics lesson, you saw the graphical representation of a web page’s structure, or using the HTML terminology, the structure of an HTML document.

The DOM API allows full control, both querying and altering the DOM, and you have practically full support in the API to leverage all features provided by the HTML markup.

What does the DOM API offer?

The best way to understand what the DOM API covers is to look at examples, but before doing this, let’s have a short overview of what this API offers to developers:

  • First of all, it allows access to a certain part of the document (the HTML markup). You can access a certain markup element using its identifier, or a collection of elements by their name, class type (according to the values of the element’s class attribute), their tag name (for example all <h1> elements), and several other aspects.
  • You can query the metadata of a document including its URL, character set, last modification date, etc.

Get hands-on with 1400+ tech skills courses.