Introduction to HTML
HTML (HyperText Markup Language) is the standard markup language for creating web pages. It forms the skeleton of every webpage — CSS adds style, JavaScript adds behaviour.
What is HTML?
HTML stands for HyperText Markup Language. Invented by Tim Berners-Lee in 1991, it is the backbone of the web. A browser reads HTML and renders it as the visual page you see.
Think of a webpage like a house — HTML is the structure (walls, rooms, doors), CSS is the interior design, and JavaScript is the electricity that powers everything.
Document Structure
Every HTML document follows the same basic skeleton:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Page Title</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
! and press
Tab to auto-generate the full boilerplate instantly (Emmet).
Tags & Elements
Most HTML tags come in pairs — an opening tag <p> and a closing tag </p>.
The content between them forms an element.
Some elements are self-closing and do not need a closing tag:
<img src="photo.jpg" alt="A photo" />
<br />
<input type="text" placeholder="Enter name" />
Try It Yourself
Edit the HTML below and click ▶ Run to see the output live.
<p> needs a </p>.
What does HTML stand for?
- HTML is the standard markup language for web pages.
- Every HTML file starts with
<!DOCTYPE html>. - A page has
<head>and<body>sections. - Elements are made of opening tag, content, and closing tag.
- Some elements like
<img>are self-closing.