22. Finding Elements in the DOM

In This Chapter

Learn how to find elements in the DOM

Use the CSS selector syntax for cleverer element discovery

As you saw in previous chapter, your DOM is nothing more than a tree-like structure made up of all the elements that exist in your HTML document:

Image

That detail is only sort of important. What is important is that you have all of these HTML elements floating around that you want to access and read data from or modify. There are many ways to find these HTML elements. After all, these elements are arranged in a tree-like structure, and if there is one thing computer scientists like to do, it is figuring ...

Get JavaScript Absolute Beginner’s Guide 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.