Skip to main content

Introduction to HTML

beginner10 min readLesson 5 of 143

What HTML is, how a browser turns it into a page, and your very first document.

HTML stands for HyperText Markup Language, and it is the language every browser on Earth understands. Every website you have ever visited — search engines, games, this page — is built on documents written in HTML.

What HTML actually is

HTML is not a programming language. It is a markup language: you take ordinary text and mark up pieces of it to say what they are. A heading, a paragraph, a list, an image — HTML labels the parts, and the browser uses those labels to build the page you see.

Here is the smallest complete HTML document:

<!doctype html>
<html>
  <head>
    <title>My first page</title>
  </head>
  <body>
    <p>Hello, world!</p>
  </body>
</html>

Reading the document

  • <!doctype html> tells the browser "this is modern HTML".
  • <html> wraps the whole document.
  • <head> holds information about the page, like its title.
  • <body> holds the content people actually see.
  • <p> marks one paragraph of text.

Save that into a file named index.html, open it in your browser, and you have published your first page — no tools, no installs.

Why learn HTML first?

Every technology you will meet later — CSS, JavaScript, React, Next.js — ultimately produces HTML. Learn to read it now and everything after becomes easier to understand.

What you learned

  • HTML is a markup language that labels content by meaning
  • A document has a head (metadata) and a body (visible content)
  • You can write and open a real page with any text editor

Now practice

Introduction to HTML — PracticeHands-on practice for “Introduction to HTML”: apply what you just learned in introduction-to-html.1 challenge · · ~5 minDocument Structure DrillsPractice the skeleton of every HTML page: doctype, html, head with title and charset, and body with headings and paragraphs — from pure imitation to building a full article page.4 challenges · · ~20 min