Creating a simple webpage is one of the best ways to begin your journey in web development. If you are new to HTML and web design, don’t worry! This step-by-step guide will walk you through the entire process in plain and easy-to-understand language. Whether you're a student, hobbyist, or future developer, you'll learn how to build your very first HTML webpage from scratch.
What is HTML?
HTML stands for HyperText Markup Language. It is the standard language used to create webpages. HTML uses tags and elements to define the structure of a webpage. It helps browsers understand how to display content, such as text, images, links, and more.
For example:
Hello, World!
This simple line displays a big heading on a webpage.
Why Learn HTML?
Before we dive into building a page, here are a few reasons why learning HTML is important:
- It’s the foundation of every website.
- It’s easy to learn for beginners.
- It works perfectly with CSS and JavaScript.
- You don’t need any special software—just a text editor and a browser.
What You Need to Get Started
To create a simple HTML webpage, you only need:
- A text editor (like Notepad, Notepad++, VS Code, or Sublime Text)
- A web browser (like Google Chrome, Firefox, Edge, or Safari)
Basic Structure of an HTML Document
Every HTML document follows a basic structure. Here's what it looks like:
My First Webpage
Welcome to My Website
This is a simple HTML webpage.
Enter fullscreen mode
Exit fullscreen mode
Let’s break it down:
: Tells the browser that this is an HTML5 document.
: The root element of the page.
: Contains meta info like title, styles, and links.
: Sets the title in the browser tab.
: All visible content (text, images, etc.) goes here.
Step-by-Step: Create a Simple HTML Page
Step 1: Open Your Text Editor
Open Notepad (Windows) or any code editor of your choice.
Step 2: Write the Basic HTML Code
Copy and paste the following code:
My Simple HTML Page
Hello World!
This is my first webpage using HTML.
Enter fullscreen mode
Exit fullscreen mode
Step 3: Save the File
Click File > Save As
Name your file: index.html
Choose "All Files" in the Save As Type dropdown
Click Save
Step 4: Open in Browser
Double-click on your saved file index.html. It will open in your browser and display your webpage!
Common HTML Tags and Their Use
Let’s add more content and learn useful tags:
1. Headings
HTML has 6 heading tags from to .
This is H1
This is H2
Enter fullscreen mode
Exit fullscreen mode
2. Paragraphs
Use to write text paragraphs.This is a paragraph in HTML.
3. Links
Use the tag to add clickable links.Visit Google
4. Images
Use the tag to add images.
5. Lists
Ordered List:
First item
Second item
Enter fullscreen mode
Exit fullscreen mode
Unordered List:
Apple
Banana
Enter fullscreen mode
Exit fullscreen mode
6. Line Break and Horizontal Line
Enter fullscreen mode
Exit fullscreen mode
Adding Style with CSS (Bonus)
To make your page look better, you can use CSS (Cascading Style Sheets).Example:
Styled Page
body {
background-color: #f2f2f2;
font-family: Arial;
text-align: center;
}
h1 {
color: darkblue;
}
p {
color: #333;
}
Styled Webpage
This page has a background color and styled text.
Enter fullscreen mode
Exit fullscreen mode
Now your webpage will look more attractive!
Add an Image and a Button
Let’s add an image and a button below your text:
Click Me
Enter fullscreen mode
Exit fullscreen mode
Complete HTML Example – Simple Webpage
My Simple Website
body {
background-color: #f4f4f4;
font-family: Verdana;
padding: 20px;
text-align: center;
}
h1 {
color: teal;
}
p {
font-size: 18px;
}
img {
border-radius: 10px;
margin-top: 10px;
}
button {
background-color: teal;
color: white;
padding: 10px 20px;
border: none;
border-radius: 8px;
cursor: pointer;
font-size: 16px;
}
Welcome to My HTML Page
This is a beginner-friendly webpage created using only HTML and a bit of CSS.
Click Me
Enter fullscreen mode
Exit fullscreen mode
Save it as index.html and open it in your browser. Voila! You just built your first styled webpage.
Tips for Practicing HTML
Try changing headings, colors, and fonts.
Add more images or text sections.
Explore other tags like , , , etc.
View the source code of websites (Right-click > View Page Source) to learn more.
Common Mistakes to Avoid
Forgetting to close tags (, , etc.)
Using the wrong file extension (always save as .html)
Missing quotes in attribute values
Not nesting tags correctly
Learning Resources
Here are some helpful resources to continue learning HTML:W3Schools HTML TutorialMozilla Developer Network (MDN)Codewithfaraz HTML CSS JS Tutorial
Conclusion
Now you know how to create a simple webpage using HTML! This is the very first step in web development. Once you’re comfortable with HTML, you can move on to CSS and JavaScript to create more interactive and beautiful websites.Keep practicing, try building your personal bio page, and experiment with different tags. Web development is a skill that gets better with time and experience. Start small, stay consistent, and you’ll soon be making full websites!