Build a basic HTML page

Task

Create a minimal but fully valid HTML5 page with a tab title, a main heading, and one paragraph of text.

Requirements

  • The document starts with <!DOCTYPE html>
  • Has <html lang="en">, <head>, and <body> elements
  • The <head> contains <meta charset="UTF-8"> and <title>
  • The <body> contains one <h1> and at least one <p>

Starter code

<!DOCTYPE html>
<html>
<head>
</head>
<body>
</body>
</html>
▶ Open in HTML Editor

Hints

  • Don't forget the lang attribute on the <html> tag.
  • meta charset always goes first inside <head>.
  • <title> sets the browser tab text, while <h1> is the heading on the page itself.
Show solution
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>My first page</title>
</head>
<body>
  <h1>Hello, world!</h1>
  <p>This is my first HTML page.</p>
</body>
</html>

Related tools