Reference lesson

The DOM

Find and update page elements.

About 8 minutes

What you’ll learn

The DOM represents the document as objects. Query an element, then update its text, attributes, classes, or children.

Try it yourself

Press Ctrl/Cmd + Enter to run.