Work with the DOM

The Document Object Model (DOM) represents the HTML page so that you can work with its content, structure, and style using JavaScript or the standard DOM APIs. For example, you can access elements in a component using standard DOM APIs like querySelector() or without a selector using template refs. Although we don't recommend manipulating the DOM, some third-party JavaScript libraries require taking over the DOM.

For more information on the DOM, see MDN Web Docs: Document Object Model (DOM).