16th July, 2026
Introduction
HTML, or HyperText Markup Language, is the standard markup language used to create webpages.
In this tutorial, you will learn how to create a basic HTML website from scratch. You will create an HTML file, add content, and open the webpage in a browser.
What You Will Learn
What is HTML?
HTML stands for HyperText Markup Language. It defines the structure and content of a webpage.
What You Need
- A computer
- A text editor such as Notepad or VS Code
- A web browser such as Chrome, Firefox, or Edge
🚀 Create Your First HTML Webpage
Step 1: Create an HTML File
Follow these simple steps to create and run your very first HTML webpage.
-
Open a Text Editor
You can use Notepad, Visual Studio Code (VS Code), Sublime Text, Notepad++, or any code editor of your choice.
-
Create a New File
Save the file with the
.htmlextension. For example:index.html -
Write the HTML Code
Copy and paste the following HTML code into your editor.
Step 2: Write Your First HTML Code
Add the following code to your
index.html file:
Step 3: Open the Website
-
Save the File
Ensure the filename is
index.html. -
Open the File in a Browser
- Double-click the HTML file, or right-click and choose Open With → Chrome, Firefox, Edge, or any browser.
- Your webpage will now be displayed.
-
Modify and Refresh
Make changes to the HTML file, save it, and refresh the browser to see the updated webpage.
📘 Basic HTML Structure Explained
<!DOCTYPE html>
Declares that the document uses HTML5.
<html>
The root element that contains the complete webpage.
<head>
Stores metadata including the page title, character encoding, CSS links, and scripts.
<title>
Displays the page title in the browser tab.
<body>
Contains all visible webpage content.
<h1>
Defines the main heading.
<p>
Defines a paragraph.
Step 4: Try Mini Project
Common Problems
index.html, not
index.html.txt.
src attribute.
What's Next?
You have created your first webpage. Now let's understand how HTML structures a webpage and how CSS can be used to style that structure.