The Document Object Model (DOM) is the API exposed by the browser to allow JavaScript to communicate with HTML and, indirectly, CSS. Since one of JavaScript's main abilities is dynamically changing content on a page, we should know how to do that. Enter the DOM.
In this chapter, we will learn how to use this powerful API to read and change content on a page. I'm sure you've seen websites that change content without reloading the page. These programs use DOM manipulation, and we'll learn how to use it.
The following topics will be covered in this chapter:
- Selectors
- Properties
- Manipulations