LOGBOOK

HELP

Quiz Entry - updated: 2026.07.05

What is the basic structure of an HTML document?

Every HTML document nests a <head> (metadata) and a <body> (visible content) inside a single root <html> element.

This skeleton is the same for almost every web page you'll ever write:

<html>
    <head>
        <title>Page Title</title>
    </head>
    <body>
        <p>Visible content here</p>
    </body>
</html>

What each part does:

  • <html> — the root element that wraps the entire document; it is always the outermost tag.
  • <head> — the metadata section: information about the page (its title, character set, linked stylesheets). None of this appears in the page body itself.
  • <body> — the visible content the browser actually renders in the window.

Two habits worth forming early: indent nested elements so the structure is readable (the browser ignores the indentation, but humans need it), and always close inner tags before their outer ones. Extra attributes — like styling hints — can be added to any element to extend it, which we cover separately.

Go deeper:

From Quiz: WEBT / HTML Documents | Updated: Jul 05, 2026