Learn the fundamental building blocks of every web page — from the boilerplate skeleton to semantic structure, forms, tables, and media.
HTML document markup is parsed by the browser into a tree of nested DOM nodes. Click any element in the tree to inspect its position in the hierarchy.
<!DOCTYPE html>
<html lang="en">
<head>
<title>My Portfolio</title>
</head>
<body>
<header className="site-header">
<nav><a href="#about">About</a></nav>
</header>
<main>
<article>
<h1>Hello World</h1>
<p>Welcome to my site.</p>
</article>
</main>
<footer>© 2026</footer>
</body>
</html>The DOM contains both Element Nodes (<div>, <p>) and Text Nodes (the literal strings inside tags). JavaScript methods like querySelector() target Element nodes, while textContent reads all descendant Text nodes!