How to Create Your First Web Page in HTML - Beginners Tutorial
Creating your first HTML web page is simple and requires no special software—just a text editor and browser.
This tutorial walks you through building a 'Hello World' page step-by-step.
Perfect for absolute beginners starting web development.
1. Prerequisites
No prior knowledge needed. Tools:
- Text editor: Notepad, VS Code, Sublime
- Web browser: Chrome, Firefox
2. Step-by-Step Guide
Follow these 4 steps:
1. Open text editor and create new file.
2. Copy the code below.
3. Save as index.html (include .html).
4. Double-click file to view in browser.
3. Complete HTML Code
<!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>This is my first HTML page. Welcome to web development!</p>
</body>
</html>
Copy, paste, save, and open—your page is live!
4. HTML Elements Explained
- <!DOCTYPE html>: Declares HTML5 document.
- <html>: Root element.
- <head>: Contains metadata like title.
- <body>: Visible content (h1, p).
5. Customize Your Page
Edit:
- Change <title>My First Web Page</title>
- Add more <p>Your name</p>
- Try <h2>Subheading</h2>
6. Common Mistakes to Avoid
- Forgetting .html extension.
- Not closing tags (e.g., <p> without </p>).
- Saving as .txt instead.
7. Next Steps
- Add images: <img src="image.jpg" alt="description">
- Create links: <a href="page2.html">Next</a>
- Learn CSS for styling.
Conclusion
You've created your first web page! Practice by building more pages.
HTML is the foundation of all websites—keep experimenting.
Codecrown