Hello World Page
4.1 The First Step
Just like learning any programming language begins with a Hello World program, creating a webpage with HTML starts the same way.
4.2 The Example Code
example.html
1<!DOCTYPE html>
2<html>
3 <head>
4 <title>Hello World</title>
5 </head>
6 <body>
7 <h1>Hello, World!</h1>
8 <p>Welcome to my very first webpage.</p>
9 </body>
10</html>
🔍 Breaking It Down
1. <!DOCTYPE html> → declares this is an HTML5 page.
2. <title> → sets the browser tab title (“Hello World”).
3. <h1> → main heading, the biggest text on the page.
4. <p> → paragraph, for normal body text.
📸 How It Looks in a Browser
• A big heading: “Hello, World!”
• A paragraph below it: “Welcome to my very first webpage.”
4.3 Try It Yourself
• Save the code in a file named <hello.html>.
• Open it in your browser by double-clicking it.
• 🎉 You've just built your first webpage!
• Open it in your browser by double-clicking it.
• 🎉 You've just built your first webpage!
4.4 Key Takeaways
• A “Hello World” page is the simplest valid HTML document.
• It shows the basic structure: doctype, head, body.
• <h1> is for headings, <p> is for text.
• You only need a text editor + browser to start coding HTML.
• It shows the basic structure: doctype, head, body.
• <h1> is for headings, <p> is for text.
• You only need a text editor + browser to start coding HTML.