QuizWeb

code made fun

Home

Learn

Cheat Sheet

Leaderboard

Profile


Profile

Settings


Document Structure

Loading code editor...

Document Structure

In this lesson, you will learn how every HTML page is built from the same basic skeleton.

Here is a quick preview of the skeleton you will build.

Loading code editor...

The DOCTYPE

Every HTML page starts with a short line that tells the browser what kind of document it is.

That line is the doctype, and you write it as <!doctype html>.

It always goes at the very top, before anything else on the page.

Loading code editor...

The HTML Tag

After the doctype comes the <html> tag, which wraps the whole page.

Everything else goes between the opening <html> and the closing </html>.

Think of it as the box that holds your entire page.

Loading code editor...

The Head tag

Inside <html> there are two main parts, and the first one is <head>.

The <head> holds information about the page, and the browser does not show it as page content.

It sits at the top, before the part visitors actually see.

Loading code editor...

The Page Title

The <title> tag goes inside <head> and gives your page its name.

That name appears in the browser tab, not on the page itself.

Pick a short title that describes what the page is about.

Loading code editor...

The Body tag

The second main part of the page is <body>, and it holds everything visitors see.

Any text you want to show on the page goes inside <body>.

While <head> works behind the scenes, <body> is the page itself.

Loading code editor...

The Page Skeleton

Put the pieces together and you get the page skeleton that almost every HTML page starts from.

The doctype comes first, then <html> wraps a <head> with a <title> and a <body> for the content.

Start every new page from this structure, and fill in the <body> as you go.