What does HTML stand for?
HTML stands for HyperText Markup Language. It is the code that gives every web page its structure: it tells the browser which parts are headings, paragraphs, images and links. HyperText means text with links to other pages, markup means the tags that label each piece of content, and language means it follows a fixed set of rules that every browser understands.
What does each word in HTML mean?
| Letters | Word | What it means |
|---|---|---|
| H, T | HyperText | Text containing links you can follow to other pages |
| M | Markup | Tags that label what each part of the content is |
| L | Language | A set of rules for writing those tags, which browsers follow |
HyperText
MDN Web Docs defines hypertext as text that contains links to other texts, as opposed to a single linear flow like a novel. The term was coined by Ted Nelson around 1965, long before the web existed. In HTML, the link element <a> is what makes a page hypertext: click a link and you jump to another page, on the same site or anywhere else.
Markup
Markup is extra information added to content to say what it is. In HTML it takes the form of tags: an element name in angle brackets, such as <p> for a paragraph or <h1> for a main heading. The tags aren't shown on the page. The browser reads them and displays the content accordingly. The word comes from printing, where editors marked up a manuscript with notes for the typesetter.
Language
HTML has a fixed vocabulary of elements and strict rules for how to write them, which is why it counts as a language. It is a markup language, though, not a programming language: it describes what content is, but it can't make decisions or repeat steps. The guide is HTML a programming language? explains the difference.
What HTML looks like
Here is a complete, very small web page. You can paste it into the HTML tab of the Code Editor and run it.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Easy pancakes</title>
</head>
<body>
<h1>Easy pancakes</h1>
<p>Makes 8 small pancakes. <strong>Ready in 20 minutes.</strong></p>
<img src="pancakes.jpg" alt="A stack of pancakes">
<a href="https://example.com/syrup">Make your own syrup</a>
</body>
</html><!DOCTYPE html>tells the browser this is a modern HTML page.<html>wraps everything.lang="en"says the page is in English, which helps screen readers.<head>holds information about the page, such as the<title>shown on the browser tab.<body>holds everything you actually see: here a heading, a paragraph, an image and a link.
Tags, elements and attributes
- A tag is the label in angle brackets. Most come in pairs: an opening tag
<p>and a closing tag</p>, with a slash. - An element is the whole thing: opening tag, content and closing tag. A few elements, such as
<img>, have no content and no closing tag. - An attribute adds detail inside an opening tag.
href="https://example.com/syrup"says where a link goes, andalt="A stack of pancakes"describes an image for people who can't see it.
Elements can sit inside other elements, like the <strong> inside the paragraph above. This is called nesting, and the rule is that the last element opened is the first one closed: <p><strong>...</strong></p>, never <p><strong>...</p></strong>. Try nesting some elements yourself, then press Mark to check it in the course.
Drag HTML elements into the correct nested order to build a navbar.
Press Mark to have your answer marked in the HTML, CSS & JavaScript course.
Who invented HTML?
Tim Berners-Lee invented HTML as part of the World Wide Web. He came up with the idea of the web in 1989 while working at CERN, the European particle physics laboratory near Geneva, and by 1990 his first web browser was running on a NeXT computer. HTML was the format his browser read.
For its first five years, from 1990 to 1995, HTML changed often, hosted first at CERN and then at the IETF, the body that writes internet standards. The tags in common use were collected into HTML 2.0, published in November 1995. Since then:
| Version | Year | Who published it |
|---|---|---|
| HTML 2.0 | 1995 | IETF (RFC 1866) |
| HTML 3.2 | 1997 | W3C (World Wide Web Consortium) |
| HTML 4 | 1997 | W3C |
| XHTML 1.0 | 2000 | W3C, as HTML rewritten in XML |
| HTML Living Standard (HTML5) | Ongoing | WHATWG, with W3C agreeing in 2019 to work on one version |
Today there are no more numbered versions. The WHATWG, a group set up by browser makers, maintains HTML as a Living Standard that is updated continuously. People still say "HTML5" for modern HTML, the name of the big revision that followed HTML 4.01 and added new elements and features, such as better support for video and audio.
HTML, CSS and JavaScript
HTML is one of three languages that build almost every web page, and each has its own job:
- HTML (HyperText Markup Language): the structure and meaning of the content.
- CSS (Cascading Style Sheets): how it looks, such as colors, fonts and layout.
- JavaScript: how it behaves, such as menus that open or forms that check what you type.
A page with only HTML works, but looks plain. The HTML, CSS and JavaScript course teaches all three in order, and what JavaScript is used for covers the third.
Other web acronyms and what they stand for
| Acronym | Stands for | What it is |
|---|---|---|
| HTTP | Hypertext Transfer Protocol | The rules browsers and servers use to send web pages |
| HTTPS | Hypertext Transfer Protocol Secure | HTTP with the connection encrypted |
| CSS | Cascading Style Sheets | The language for styling HTML |
| URL | Uniform Resource Locator | A web address, such as https://example.com/page |
| XML | Extensible Markup Language | A markup language for storing and sending data |
| XHTML | Extensible HyperText Markup Language | HTML written with the stricter rules of XML |
| DOM | Document Object Model | The browser's model of a page, which JavaScript can change |
| WWW | World Wide Web | All the web pages linked together by hypertext |
Notice how many share the word hypertext. HTML is the hypertext, and HTTP is how it travels. The guide how the internet works shows where both fit.
Common mistakes
- Getting the words wrong. It is HyperText Markup Language, not "Marking" or "Machine" language.
- Calling HTML a programming language. It is a markup language: it describes content but doesn't carry out instructions.
- Closing tags in the wrong order. The last element opened must be the first one closed.
- Using HTML for looks. Choose elements for what the content is (a heading, a list), and use CSS for how it looks.
- Leaving out alt text. Every meaningful image needs an
altattribute describing it.
For wider computer science practice in a short timed practice test, try today's AP Computer Science Principles paper. Each paper mixes topics.
Common questions
What does HTML stand for?
What is HTML used for?
Who invented HTML?
Is HTML a programming language?
What does HTML5 mean?
What is the difference between HTML and HTTP?
Revision cards
Say the answer first, then flip the card to check it.
Where to go next
- Solve it
Code Editor
Write and run code right in your browser
Open the tool - Learn it
HTML, CSS & JavaScript
Learn how to think like a web developer from the ground up
Start the course - Test it
AP Computer Science Principles
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper