← Back to list

How is HTML compiled?

HTML is not compiled in the classic sense. Instead, a web browser parses and interprets it.

Thotanithya · 2026-07-03 09:53 · 0 claps · 1.2 min read
#html5-development #html #html-css #html5 #govindhtech
Open on Medium ↗
Wiki topics: 🌐 · Web Development

How is HTML compiled?

HTML is not compiled in the classic sense. Instead, a web browser parses and interprets it.

The procedure goes like this:

  1. The browser downloads the HTML document.

The browser asks a web server for the HTML document when you access a webpage.

<!DOCTYPE html>

<html>

<head>

<title>My Page</title>

</head>

<body>

<h1>Hello World</h1>

</body>

</html>

  1. The browser parses the HTML.

The browser verifies the validity of the tags after reading the HTML from top to bottom.

For instance:

<h1>Hello World</h1>

<p>Welcome!</p>

The browser understands:

Using <h1> as a header

<p> in paragraph form

  1. The browser builds the DOM.

HTML becomes the DOM, a tree-like structure.

Document

└── html

├── head

└── title

└─ ─ body

├── h1

└── p

JavaScript interacts with this DOM to make dynamic changes to the webpage.

  1. CSS is interpreted

If HTML links CSS:

<link rel=”stylesheet” href=”style.css”>

After parsing CSS, the browser creates a CSSOM.

  1. Render tree creation

The browser blends the following:

DOMAIN

CSSOM.

to construct a Render Tree that only includes the components that must be shown.

  1. Layout (Reflow)

The browser computes:

element locations, margins, padding, widths, and heights

Where everything shows on the page is determined in this step.

  1. Applying paint

The browser displays:

text colors, borders, images, and backgrounds onto the screen.

  1. Compositing

Different sections of the page are arranged on layers by modern browsers, which also mix them well. As a result, scrolling and animations run smoothly.

Have you compiled HTML?

No. The markup language HTML isn’t a programming language. It describes page structure rather than providing directions.


메타데이터
post_id
f7c8eefb0897
slug
how-is-html-compiled-f7c8eefb0897
url
https://medium.com/@thotanithya1990/how-is-html-compiled-f7c8eefb0897
canonical_url
https://medium.com/@thotanithya1990/how-is-html-compiled-f7c8eefb0897
author_url
https://medium.com/@thotanithya1990
status
ok
fetched_at
2026-07-10 09:52:19