Learn HTML
HTML is the standard markup language for building web pages, and it is the first thing most web developers learn.
HTML describes the structure of a web page. It is made of a series of building blocks called elements, and the browser reads those elements to decide what to show, in what order, and with what meaning.
What HTML Stands For
HTML is short for HyperText Markup Language. Each word tells you something about how it works:
- HyperText is text that links to other text, connecting pages across the web.
- Markup means wrapping content in tags that describe what each piece is.
- Language means there is an agreed set of tags every browser understands the same way.
A Simple HTML Document
Here is a small but complete page. The whole document lives inside <html>, page settings go in <head>, and everything visible goes in <body>.
Example
<!DOCTYPE html>
<html>
<head>
<title>My Page</title>
</head>
<body>
<h1>Welcome</h1>
<p>This is my first web page.</p>
</body>
</html>Example Explained
Note: You write <h1>Welcome</h1> and the reader simply sees the word Welcome as a large heading. The tags themselves are never shown.
Why Learn HTML?
Every website you visit is built on HTML, so it is the foundation for everything else, from styling with CSS to interactivity with JavaScript.
- It is quick to learn and needs no special software.
- It works in every browser without setup.
- It is the base layer that CSS and JavaScript build on.
Note: You do not need to memorize every tag. Learn a handful well and use a reference for the rest. This tutorial introduces them one topic at a time.
Exercise: HTML Introduction
What is the primary purpose of HTML on a web page?
Frequently Asked Questions
- Is HTML a programming language?
- No. HTML is a markup language: it describes the structure and meaning of content, but has no logic, variables or conditions. Programming in a web page comes from JavaScript.
- How long does it take to learn HTML?
- A few days to write valid pages and a couple of weeks to be comfortable with forms, tables and semantic elements. HTML is small; most of the remaining effort goes into CSS.
- Do I need to learn HTML before CSS and JavaScript?
- Yes. CSS styles HTML elements and JavaScript manipulates them, so both need something to act on. Learn enough HTML to build a page, then add CSS, then JavaScript.
- What is semantic HTML?
- Using elements that describe what content is rather than how it looks: header, nav, main, article and footer instead of generic divs. It improves screen reader navigation and gives search engines clearer structure.