Skip to content

Your first HTML page

Create a folder anywhere on your PC, then create a file named:

index.html

Paste this:

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>My First Page</title>
</head>
<body>
<h1>Hello, world!</h1>
<p>This is my first web page.</p>
</body>
</html>

Double-click index.html to open it in your browser.

You will keep adding to this file throughout the next several lessons, so give it a real topic now.

  1. Change the <h1> text from Hello, world! to a topic you actually know something about — a hobby, a place, a game, anything.
  2. Change the <p> text to one sentence introducing that topic.
  3. Save the file and refresh your browser to confirm the changes appear.

Hold onto this file. The exercises in the next module all build on it.