Reference lesson

Build a document the browser understands

Learn why documents have a doctype, head, and body.

About 8 minutes

What you’ll learn

A browser reads HTML as a tree of meaningful elements. The head describes the page; the body contains what people experience.

Try it yourself

Press Ctrl/Cmd + Enter to run.