Introduction to HTML
What is HTML?
HTML (HyperText Markup Language) is the standard markup language used to create web pages. It describes the structure of a page using elements — headings, paragraphs, links, images, and more. Every website you've ever visited is built on HTML underneath.
HTML is not a programming language — it has no logic or calculations. It's a markup language: it labels content so the browser knows how to display it.
Editors
You don't need any special software to write HTML — a plain text editor is enough. Popular free choices:
- VS Code — the most widely used code editor today, free and cross-platform
- Sublime Text — lightweight and fast
- Notepad / TextEdit — built into Windows/Mac, works but has no helpful features
Avoid Microsoft Word or Google Docs for writing HTML — they add hidden formatting that breaks your code.
A Basic Example
Here's the smallest complete HTML page:
<!DOCTYPE html>
<html>
<head>
<title>My First Page</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>This is my first paragraph.</p>
</body>
</html>
What each part does:
<!DOCTYPE html>— tells the browser this is a modern HTML5 page<html>— the root element, wraps everything<head>— metadata (not shown on the page itself)<body>— everything the visitor actually sees
Save this as index.html and open it in any browser — no server needed to view plain HTML.