Page Skeleton

Below the declaration, every web page has the same basic structure, a skeleton made of three elements: html, head and body.

The html element, named after the language itself, wraps the whole page. It comes right after the document type declaration, and all the other elements of the page go inside it.

Inside html, there are two elements. The first one is head, the head of the page. It holds information about the page that isn't shown in the page itself. This includes, for example, the page's title, which the browser shows in the tab, and the small icon next to it, called the favicon. Both are set in the head element:

The second one is body, the body of the page. It contains everything you can see on the page: headings, paragraphs, images, videos, links and much more.

The head element always comes before the body element. Put together, the skeleton looks like this:

<!DOCTYPE html>
<html>
	<head>
	</head>
	<body>
	</body>
</html>

Don't worry about the spaces at the beginning of some lines for now. We'll explain them later in this lesson.

Instructions

Below the document type declaration, create the html element.

Inside the html element, create the head element.

Inside the html element, below the head element, create the body element.

Start programming for free

By signing up, you agree to the Terms of Service and Privacy Policy.

Or sign up with:

4/8