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 Listing 6-6.

Get hands-on with 1200+ tech skills courses.