Index Ai Academy
Glossary · Phase 8 · APIs

DOM

Also written: document object model

The tree of objects a browser builds from a page's HTML; JavaScript changes the page by changing it.

When a browser reads HTML it builds the DOM, a tree of objects: document at the root, elements such as <form> and <div> as branches, and text as leaves. JavaScript changes the page by changing that tree, and the browser redraws to match.

Try it now

The question for each line: could this text have come from a model or a user?

Learn it properly

A chat front end in the browser · The DOM and events, model text kept out of innerHTML, a streamed reply parsed from server-sent events, and a Stop button. About 35 minutes.

Create a free account See what's in the lesson

Other terms from the same lesson

Never trained an AI?

Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.

Teach it to write