Introduction

6 min read ·

HTML stands for HyperText Markup Language. It is the standard markup language used to create web pages and web applications.
Every website you see on the internet uses HTML in some form.
This HTML tutorial is designed for beginners who want to learn HTML from scratch step by step.
HTML is considered the foundation of web development because it defines the structure of web pages.

What is HTML?

HTML is used to structure content on a webpage.
Using HTML, developers can create:
  • Headings
  • Paragraphs
  • Images
  • Links
  • Tables
  • Forms
  • Buttons
  • Lists
HTML tells the browser how content should appear on the screen.
Note

HTML is not a programming language. It is a markup language used to structure webpage content.

Understanding Websites Before HTML

Before learning HTML deeply, first understand how websites work.
When you open a website in your browser:
  • The browser requests webpage files from a server
  • The server sends HTML files
  • The browser reads HTML code
  • The webpage gets displayed on screen
HTML acts like the skeleton of a website.
Without HTML, webpages cannot display proper content structure.
Real World Scenario

When you open YouTube, the video title, buttons, comments section, and navigation menu are all structured using HTML.

Why HTML is Important?

HTML is the first technology every web developer learns.
Without HTML:
  • Websites cannot be structured
  • Content cannot be displayed properly
  • Browsers cannot understand webpage layout
HTML works together with:
  • CSS for styling
  • JavaScript for interactivity

Features of HTML

HTML provides many useful features for creating webpages.

Simple Syntax

HTML syntax is beginner friendly and easy to understand.

Platform Independent

HTML works on all operating systems and browsers.

Supports Multimedia

HTML allows developers to add:
  • Images
  • Videos
  • Audio

Hyperlink Support

HTML allows webpages to connect with other webpages using links.

Structured Content

HTML organizes webpage content using tags and elements.
Pro Tip

HTML is the backbone of frontend web development. Strong HTML knowledge makes learning CSS and JavaScript much easier.

History of HTML

HTML was created by Tim Berners-Lee in 1991.
The main purpose of HTML was to share and structure documents over the internet.
Over time, HTML evolved into a powerful technology used for modern websites and applications.
Today, HTML5 is the latest version of HTML.

What are HTML Tags?

HTML uses tags to structure webpage content.
Tags are special keywords enclosed inside angle brackets.

Example

In the above example:
  • <h1> is an opening tag
  • </h1> is a closing tag
  • Text inside the tags is the content

Structure of an HTML Element

An HTML element usually contains:
  • Opening tag
  • Content
  • Closing tag

Example

Here:
  • <p> starts the paragraph
  • </p> ends the paragraph

Basic HTML Page Structure

Every HTML document follows a basic structure.

Example

Understanding the Above Code

<!DOCTYPE html>

Defines the document type as HTML5.

<html>

Represents the root element of the webpage.

<head>

Contains webpage information like:
  • Title
  • Meta tags
  • CSS links

<title>

Defines the webpage title shown in browser tab.

<body>

Contains all visible webpage content.
Note

Everything visible on the webpage is usually written inside the <body> tag.

First HTML Example

Let us create a simple webpage.

Example

Output

The browser displays:
  • A heading
  • A paragraph
This is the first step in web development.
Goal Achieved

You have successfully written your first HTML webpage.

Why Browsers Understand HTML

Browsers like:
  • Google Chrome
  • Microsoft Edge
  • Mozilla Firefox
can read HTML files directly.
The browser converts HTML code into visual webpages.
This process is called rendering.

HTML File Extension

HTML files are saved using:
  • .html
  • .htm

Example

How to Run HTML Code?

HTML does not require installation like programming languages.
You only need:
  • A text editor
  • A web browser

Steps to Run HTML

  1. Open a text editor
  2. Write HTML code
  3. Save file with .html extension
  4. Open file in browser

Best Editors for HTML

Popular HTML editors include:
  • Visual Studio Code
  • Sublime Text
  • Notepad++
  • Brackets
Real World Scenario

Frontend developers use editors like VS Code to build websites using HTML, CSS, and JavaScript.

HTML in Modern Web Development

HTML is used in:
  • Personal websites
  • Business websites
  • E commerce platforms
  • Blogs
  • Portfolio websites
  • Web applications
Every webpage on the internet depends on HTML structure.

HTML vs Programming Languages

HTMLProgramming Languages
Structures contentPerforms logic
Uses tagsUses instructions
Creates webpage layoutCreates application functionality
Not a programming languageProgramming languages

Why Beginners Should Learn HTML First?

HTML is usually the first step into web development because:
  • Easy to learn
  • Simple syntax
  • Instant visual output
  • Builds foundation for frontend development
After HTML, beginners usually learn:
  1. CSS
  2. JavaScript
  3. Frontend frameworks

Common Mistakes by Beginners

Missing Closing Tags

Incorrect:
Correct:

Incorrect File Extension

Wrong:
Correct:

Writing Content Outside Body Tag

Visible webpage content should be written inside the <body> section.
Caution

Incorrect HTML structure may cause webpages to display improperly in browsers.

Real Importance of HTML

Today, almost every online platform uses HTML.
Examples include:
  • Social media websites
  • Online shopping websites
  • News portals
  • Educational websites
  • Streaming platforms
Even mobile applications often use HTML internally in some components.

Exercise

Create a webpage named home.html.
Add:
  • One heading
  • One paragraph

Example

Learn HTML Introduction | HTML Course