What is HTML?
HTML stands for HyperText Markup Language, and it is the reason the web looks the way it does. Every page you have visited, from a plain blog post to a busy online shop, is built on HTML. When you type an address and press enter, the browser downloads an HTML file, reads the tags inside it, and turns them into the headings, paragraphs, links, and images on your screen. The whole job happens in a split second, and you have seen the result thousands of times.
Here is the key idea: HTML describes structure, not design. A tag tells the browser what a piece of content is, a heading, a paragraph, a list, a button. The browser does not invent that meaning on its own. It follows the tags in order, from the top of the file to the bottom. Move a block of HTML higher in the file and the browser shows it higher on the page. That reading order is why pages behave the way they do.
HTML is also not a programming language. JavaScript makes decisions, runs loops, and does math. HTML cannot do any of that. It only marks up content, which is why it is called a markup language. This course starts with plain HTML, adds styling with CSS later, and brings pages to life with JavaScript at the end.
How the browser reads a page
The browser reads an HTML file from top to bottom, one tag at a time. An opening tag starts a piece of content and the closing tag ends it. Whatever sits between the two tags is the content that tag controls. When a tag is missing or misplaced, the browser still tries to show the page, but it has to guess what you meant, and its guesses are often wrong. That is why a small typo can scramble an entire layout.
<h1>This is a heading</h1>
<p>This is a paragraph of text.</p>
Structure versus design
Think of a page as a person. HTML is the skeleton, the parts and how they connect. CSS is the skin and clothes, the colors, fonts, and spacing. JavaScript is the muscles, the movement and behavior. You can restyle a page completely without touching a single word of its HTML, and that separation is what keeps big websites manageable.
Syntax
<!DOCTYPE html>
<html>
<head>
<title>My first page</title>
</head>
<body>
<h1>Hello world</h1>
<p>My first paragraph.</p>
</body>
</html>
Missing <!DOCTYPE html> Secretly Breaks Your CSS Box Model
Without <!DOCTYPE html> as the very first line, browsers switch to Quirks Mode - paddings and widths calculate like IE5.5 and CSS ignores modern layout. Reddit r/webdev and Stack Overflow (1000+ 'why is my layout broken' questions) show devs waste hours debugging CSS that is actually a DOCTYPE typo. Fix: always start files with <!DOCTYPE html>, case-insensitive but must be byte 1.
<!DOCTYPE html> <!-- must be line 1, no comments before -->
Good to know
- HTML stands for HyperText Markup Language.
- HTML describes structure, not design or behavior.
- The browser reads the file from top to bottom.
- Browsers forgive mistakes, but the result may look wrong.