What is HTML?

HTML is the language that tells a website what things exist on a page, like text, buttons, and images.

Think of it like this

HTML is the skeleton of a website. It decides which parts exist and where they go - this is a heading, this is a paragraph, this is a button - in the same way a skeleton decides where the head, arms, and legs go before anything gets dressed up.

What's happening

Diagram showing HTML tags structuring a web page into headings, paragraphs, and images

Summary

HTML gives a web page its structure, labelling every piece of content - headings, paragraphs, images, links - so browsers, search engines, and screen readers know what each part is.

A Closer Look

HTML (HyperText Markup Language) is the basic code that gives every web page its structure. It uses tags, written in angle brackets, to label the different parts of a page. A heading is wrapped like <h1>Welcome</h1>, a paragraph goes inside <p> tags, and a link uses an <a> tag that says where it points. Your browser reads these labels and turns them into the page you see.

Good HTML describes what content is, not just how it should look - often called semantic HTML. Marking a heading as a real heading, instead of just making some text big and bold, matters because people and machines other than you read it too. Screen readers use those labels to let blind and partially sighted users jump between sections, and search engines use them to understand what a page is about. The "HyperText" in the name means links - the ability to jump from any page to any other is the idea the whole web was built on.

HTML was created by Tim Berners-Lee, a British scientist working at the CERN research laboratory in Switzerland, as part of the World Wide Web, which he proposed in 1989. It has grown a great deal since then, adding tags for video, audio and forms, yet a simple page written in the early days will still open in a modern browser. When your browser reads HTML, it builds an internal family tree of every element, called the DOM (Document Object Model): the page contains a body, the body contains sections, and the sections contain headings and paragraphs. CSS uses this tree to decide what to style, and JavaScript uses it to find and change parts of the page.

Common Misconceptions

  • HTML is not a programming language - it's a markup language. It describes structure, not instructions or logic.
  • HTML alone doesn't make a site look good - that's CSS's job.
  • You don't need special software to write HTML - it's just a text file with a .html extension.

Frequently asked questions

How long does it take to learn HTML?

The basics can be picked up in a few days. There are many tags, but a small handful - headings, paragraphs, links, images and lists - cover most everyday pages, and you can write a simple working web page on your first afternoon. Learning to choose the right tag for each job, and to make pages accessible to everyone, takes longer and comes mostly through practice.

Do I still need to learn HTML if I use a website builder?

Not to get started - website builders and blogging platforms write the HTML for you behind the scenes. But knowing a little helps a lot. It lets you fix odd formatting, paste in embed codes for things like videos or maps, understand why a page looks wrong, and make sure headings and image descriptions are set up properly for search engines and screen readers.

What is the difference between HTML and HTML5?

HTML5 is simply the modern version of HTML. It added tags for things that previously needed extra plugins or workarounds, such as <video> and <audio>, plus tags like <nav> and <article> that describe the parts of a page more clearly. HTML is now updated continuously rather than in numbered versions, so in practice "HTML" and "HTML5" mean the same thing.

How it connects

HTML is the foundation - these topics build directly on top of it:

Try it yourself

Right-click anywhere on this page and choose "View Page Source". You'll see the real HTML code behind what you're reading right now.