Element Specific Properties

In this lesson, we will learn about accessing DOM elements represented by JavaScript objects via the properties that are specific to those JavaScript objects. Let's begin!

DOM elements are represented by JavaScript objects. When you access an element through the document tree, you can access the properties of that specific JavaScript object. Depending on what HTML element is behind the specific object, you can work with different property sets.

For example, when you work with an <ol> element, you can refer properties that are <ol>-specific, as shown in the Listing below.

Get hands-on with 1400+ tech skills courses.