Lesson 1 of 14 · 5 min

Your first web page

Every page on the web is built from HTML. HTML is ordinary text, plus tags that tell the browser what each part of the page is.

A tag is a word between angle brackets. Most tags come in pairs: an opening tag, and a closing tag that has a slash.

<h1>This is a heading</h1>

<h1> means "heading, level 1": the biggest, most important heading on the page. The browser shows it large and bold. Everything between the opening and closing tags is the heading's text.

The editor already holds a complete, nearly empty web page. You don't need to understand every line yet:

  • <!DOCTYPE html> tells the browser this is a modern web page.
  • <head> holds information about the page, such as the title shown in the browser tab.
  • <body> holds everything you actually see on the page.

The line starting with <!-- is a comment: a note for people reading the code. The browser ignores it.

Your task

Inside <body>, add a heading that says Hello, world!

Type it yourself rather than copying. Getting the angle brackets and the slash right is part of learning. The preview updates as you type. When it looks right, press Check my code.

index.html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>My first page</title>
</head>
<body>
  <!-- Add your heading on the line below -->

</body>
</html>

Your page

Discussion

Stuck? Ask here. Be kind, and share hints rather than full answers.

Loading the discussion…