HTML Basics · Lesson 1 of 11

Your First Web Page

A web page is a text file written in HTML. HTML uses tags to tell the browser what each piece of text is. A tag is a word inside angle brackets, like <h1>.

Most tags come in pairs. An opening tag starts something, and a closing tag with a slash ends it. Everything between the two is the content:

<h1>Hello!</h1>

The opening tag, the content and the closing tag together are called an element. This one is an h1 element: the main heading of a page.

A paragraph of text uses the <p> tag:

<p>This is a paragraph.</p>

Type in the editor on the right. The preview under it shows your page and updates a moment after you stop typing.

Forgetting the slash in the closing tag is the most common mistake. If the whole page suddenly turns into one big heading, look for a missing </h1>.

Your Task

  1. Add an <h1> heading with any text you like, for example your name.
  2. Under it, add a <p> paragraph with a sentence about yourself.
  • The page has an <h1> heading with some text
  • The page has a <p> paragraph with some text
  • The heading is closed before the paragraph starts