CPCODELAB
HTML

What Is HTML and How Browsers Read It

8 min read

What Is HTML?

HTML stands for HyperText Markup Language. It is the standard language used to create and structure content on the web. Every web page you have ever visited is built on an HTML foundation — it tells the browser what the content is, not how it should look.

HTML uses elements made of tags. A tag is written inside angle brackets, like <p>. Most elements have an opening tag and a closing tag, and the content sits between them.

How the Browser Reads HTML

When you type a URL, the browser fetches an HTML file from a server. It then parses that file from top to bottom, building a tree of elements called the DOM (Document Object Model). Every element becomes a node in this tree, and the browser uses the tree to render the page on screen.

html
<!-- A minimal HTML element -->
<p>Hello, world!</p>

<!-- An element with an attribute -->
<a href="https://example.com">Click me</a>

HTML is not a programming language. It has no logic or loops. It is a markup language — its only job is to describe structure and meaning.

Attributes live inside the opening tag and provide extra information about the element. In <a href="url">, the attribute is href and its value is the URL. Attribute values are always wrapped in double quotes in well-written HTML.

Ready to test yourself?
Practice HTML— quiz & coding exercises