New! Explore our Programming Academy and AI Tutor - learn to code from scratch, free to start. Explore Now
Programming HTML Your First HTML Page

Your First HTML Page

🌐 HTML

Create your very first web page from scratch.

Lesson 2 of 7 Tutorial
0/7 completed

Your First HTML Page

HTML (HyperText Markup Language) is the standard language for creating web pages. Every website you visit is built with HTML.

The Basic Structure

Every HTML page follows this skeleton:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My First Page</title>
</head>
<body>
    <h1>Hello, World!</h1>
    <p>This is my first web page.</p>
</body>
</html>
📌 Key Parts
  • <!DOCTYPE html> — tells the browser this is HTML5
  • <head> — contains metadata (title, charset, etc.)
  • <body> — contains everything visible on the page

Try It

Copy the code above, paste it into a text editor (like Notepad or VS Code), save it as index.html, and open it in your browser.

Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>My Page</title>
</head>
<body>
    <h1>Hello, World!</h1>
    <p>This is my first web page.</p>
</body>
</html>

Exercises

Exercise 1. Set the Page Title and Heading Easy
Edit the starter file so that:
1. The <title> reads exactly: My First Web Page
2. The <h1> heading reads exactly: Hello, World!
Keep all other tags exactly as they are.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>My Page</title>
</head>
<body>
    <h1>Hi there</h1>
</body>
</html>
Expected Output
Title: My First Web Page
Heading: Hello, World!

Lesson Nav

Lesson sections