What is HTML?
Learn what HTML is, what it does, and the basic building blocks of a web page.
What is HTML?
HTML stands for HyperText Markup Language; it is not a programming language, it is a markup language. Its job is to describe the structure and content of a web page: which text is a heading, which is a paragraph, which is a link, which is an image.
The heart of HTML is the short code snippet called a <tag>. Tags wrap content like boxes and tell the browser what each box is for. The browser reads these tags and draws the page on screen.
Tags and elements
An HTML tag is a keyword written between angle brackets; <p> is a paragraph tag. Most tags work in pairs: an opening tag, a closing tag and the content between them together form an element.
For example, <p>Hello</p> is a paragraph element. The Hello inside the tags is the element's content. The leading / on the closing tag tells the browser the element ends there.
How the browser draws
A browser reads the HTML file line by line and draws the page according to each tag's role. A heading tag is shown in large font, a paragraph tag on a new line, a link tag as clickable.
What you see when you open the page is the browser's drawing result. HTML only describes the structure; the detailed look depends on styling added later.
Exercise Write an element
Write any HTML element: opening tag, content and closing tag working together. For example <p>Hello</p>.
Show example solution
<p>Hello world</p>
Test yourself
-
Which character marks a closing tag?
- <
- >
- /
- !
Show answer
/ — Correct. The / at the start of a closing tag tells the browser the element ends.
-
Close the paragraph
<p>Hello____Show answer
<p>Hello</p> -
Match each part to its role
- Opening tag
- <p>
- Closing tag
- </p>
- Content
- Hello
- Element
- <p>Hello</p>