← HTML tutorial

HTML

Introduction to HTML

HTML (HyperText Markup Language) is the language browsers use to understand what's on a web page: which text is a heading, which is a paragraph, where an image goes, where a link points to. It is not a programming language — it has no if statements, no math, no way to make a decision. It's a markup language: a system for wrapping content in tags that say what each piece is, leaving the "how it looks" to CSS and the "how it behaves" to JavaScript.

Why does the split matter? Because it means three completely different skills — structure, style, and behavior — can each be worked on independently without breaking the others. Change a page's colors entirely, and its HTML structure doesn't need to change at all.

A little context: two more small examples first

<h1>Page Title</h1>
<p>A short paragraph.</p>
<ul>
  <li>First item</li>
  <li>Second item</li>
</ul>

Notice the repeating pattern: a tag names what something is (h1 = "main heading," li = "list item"), and whatever sits inside it is the content that label applies to. That pattern — a tag wrapping content — is nearly all of HTML.

Every HTML document also follows the same basic skeleton, shown in the editable example below. Edit it and press Run to see your changes appear instantly on the right — that live preview is exactly how you'll explore every example in this tutorial.

Try it yourself