Parsing HTML → DOM
The browser reads HTML top to bottom, tokenizes the tags, and builds the DOM — a tree of nodes representing the page's structure and content.
<p>Hi</p> becomes a paragraph node with a text child.
<html>
<body>
<p>Hi</p>
html
body
p
"Hi"
Tap the example to replay it · press and hold to slow it down