How to Create Basic Webpage

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 HTML is
How to create an HTML file
Basic HTML document structure
How to add headings and paragraphs
How to add links and images

What is HTML?

HTML stands for HyperText Markup Language. It defines the structure and content of a webpage.

HTML is used for structure, CSS is used for presentation, and JavaScript is used to add interactivity.

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.

Step-by-Step Guide
  1. Open a Text Editor

    You can use Notepad, Visual Studio Code (VS Code), Sublime Text, Notepad++, or any code editor of your choice.

  2. Create a New File

    Save the file with the .html extension. For example: index.html

  3. 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:

HTML Editor
Live Output

Step 3: Open the Website

Displaying the webpage
  1. Save the File

    Ensure the filename is index.html.

  2. 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.
  3. 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.

Congratulations! You have successfully created your first HTML webpage. Continue experimenting by adding headings, images, links, tables, and lists to build more interesting webpages.

Step 4: Try Mini Project

HTML Editor

Common Problems

Check that the file is saved as index.html, not index.html.txt.

Save the HTML file and refresh your browser.

Check the image filename and path in the 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.

Frequently Asked Questions

HTML is the standard markup language used to structure webpages.

Yes. You can create and view basic HTML files locally without an internet connection.

HTML is a markup language rather than a programming language. It defines the structure of webpage content.