Create Your First HTML Page

Start your web development journey by building your very first "Hello World" webpage!

šŸŽÆ Beginner Friendly
⚔ Instant Results
šŸŽØ Hands-on Learning

What is HTML?

HTML (HyperText Markup Language) is the standard markup language for creating web pages. It describes the structure of a web page and consists of a series of elements that tell the browser how to display content.

🌐 Think of HTML as:

  • šŸ—ļøThe Building's Framework - Creates the structure
  • šŸ“The Content Writer - Adds text, images, links
  • šŸ“ŠThe Organizer - Arranges content logically
šŸŒ

HTML Powers the Web

Every website you visit is built with HTML. It's the foundation of web development!

šŸš€ Step-by-Step Guide

1

Create Your HTML File

Create a new file called index.html on your computer.

šŸ“my-first-website/
šŸ“„index.html
šŸ“„style.css
šŸ“„script.js

šŸ’” Pro Tip

Name your first file index.html - browsers automatically look for this file when visiting a website!

How to create the file:

Windows: Right-click → New → Text Document → Rename to index.html
Mac: Open TextEdit → Format → Make Plain Text → Save as index.html
VS Code: File → New File → Save as index.html
2

Write Basic HTML Structure

Every HTML page needs a basic structure. Copy this code into your index.html file:

HTML
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My First Web Page</title>
</head>
<body>
    <h1>Hello World! šŸŒ</h1>
    <p>Welcome to my first HTML page!</p>
</body>
</html>

šŸ“– Understanding the Structure

<!DOCTYPE html>Tells browser this is HTML5
<html>Root element wrapping all content
<head>Contains page info (not visible)
<body>Contains visible content
<h1>Main heading (largest text)
<p>Paragraph for regular text
3

Save and View Your Page

Save your file and open it in a web browser to see your creation!

How to open:

1. Save your index.html file
2. Right-click the file
3. Select "Open with" → Choose your browser
4. Or drag the file into an open browser window

šŸŽ‰ Congratulations!

You've just created your first web page! You're officially a web developer!

browser-window.com

Hello World! šŸŒ

Welcome to my first HTML page!

This is how your page will look in a browser!

šŸŽ® Interactive HTML Playground

Try It Yourself!

Edit the HTML code below and see your changes instantly in the preview.

HTML
<!DOCTYPE html>
<html>
<head>
    <title>My Playground</title>
    <style>
        body { 
            font-family: Arial, sans-serif; 
            padding: 20px;
            background: #f0f8ff;
        }
        h1 { color: #2c5aa0; }
        .fun { 
            background: yellow; 
            padding: 10px;
            border-radius: 5px;
        }
    </style>
</head>
<body>
    <h1>Hello World! šŸš€</h1>
    <p>Welcome to <span class="fun">HTML Playground</span></p>
    <p>Try changing this text!</p>
    <button onclick="alert('You clicked me!')">Click Me!</button>
</body>
</html>

Live Preview

šŸ’” Experiment Ideas:

  • • Change "Hello World" to your name
  • • Add more paragraphs with <p>
  • • Try different emojis like šŸŽØ or ⭐
  • • Change the background color in the style tag

🧩 Common HTML Elements

šŸ“

Heading

<h1> to <h6>

Creates headings of different sizes

<h1>Main Title</h1>
šŸ“„

Paragraph

<p>

Creates a paragraph of text

<p>This is a paragraph.</p>
šŸ”—

Link

<a>

Creates hyperlinks to other pages

<a href="https://example.com">Visit Site</a>
šŸ–¼ļø

Image

<img>

Displays images on your page

<img src="image.jpg" alt="Description">
šŸ“‹

List

<ul>, <ol>, <li>

Creates ordered or unordered lists

<ul><li>Item 1</li></ul>
šŸŽÆ

Division

<div>

Container for grouping elements

<div>Content here</div>

What's Next?

You've taken your first step into web development! Ready to learn more?

šŸŽ‰

You Did It!

You've created your first HTML page and started your web development journey!

Share your achievement with friends! šŸš€

Ā© 2024 WebDevLearn. Making web development accessible for everyone.

VIDO - Learn Web Development