</>
CodeLearn Pro
Start Learning Free β†’
🌐 Web Front-End✦ Beginner⚑ Live in browser

HTML

The building block of every website on the internet. Learn HTML from absolute zero β€” no experience needed. Every example runs live in your browser.

Markup languageTags & elementsNo installationBeginner #1 pickRuns everywhereStart here
HTML programming β€” browser window showing colorful HTML tags and elements exploding outward on dark background
1993
Year created
#1
Start here
10
Live examples

Quick facts

πŸ“…
Created
1993 by Tim Berners-Lee
🌐
Type
Markup language
🎯
Purpose
Structure of web pages
πŸ“¦
Extension
.html or .htm files
⚑
Runs in
Every web browser
πŸ”§
Works with
CSS for style, JS for logic

What is HTML?

The language every web page is written in

HTML β€” HyperText Markup Language β€” was invented in 1993 by Tim Berners-Lee, the creator of the World Wide Web. Its job is simple: describe what content appears on a page and how it is organised.

HTML works through tags β€” special words inside angle brackets like <h1>, <p> and <img>. Your browser reads these tags and knows how to display the content β€” a heading, a paragraph, an image.

HTML is always the starting point. You will later add CSS to control how things look (colours, fonts, layout) and JavaScript to make things interactive. But without HTML there is nothing to style or interact with β€” it is the foundation everything else is built on.

Every page on the internet β€” every website, web app and email newsletter β€” uses HTML. Learning it is the single most valuable first step in web development, and it only takes a day to get started.

What you will learn

  • 1What HTML is and how browsers read it
  • 2Document structure β€” html, head, body
  • 3Headings, paragraphs and text formatting
  • 4Links with the <a> tag
  • 5Images with the <img> tag
  • 6Ordered and unordered lists
  • 7Tables for structured data
  • 8Forms β€” inputs, buttons, labels
  • 9Semantic HTML β€” header, nav, main, footer
  • 10HTML attributes and values
Start the tutorial β†’

Taste of HTML

Your first HTML page

This is a complete HTML page. Save it as index.html and open it in a browser β€” or press View in the learn page to see it rendered.

index.htmlHTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>My First Page</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>Welcome to my first HTML page.</p>
<a href="https://codeattelier.com">Learn more</a>
</body>
</html>
Rendered in browser

Hello, World!

Welcome to my first HTML page.

Learn more

Reference

HTML Tag Reference

The most important HTML tags. Bookmark this section β€” you will come back to it often.

TagWhat it does
<!DOCTYPE html>Declares this is an HTML5 document
<html>Root element β€” wraps the entire page
<head>Contains metadata β€” title, CSS links, etc.
<title>Sets the text shown in the browser tab
<body>Contains everything visible on the page
<h1> to <h6>Headings β€” h1 is biggest, h6 is smallest
<p>Paragraph of text
<a href="url">Hyperlink β€” click to navigate
<img src="url" alt="">Displays an image
<ul> / <ol>Unordered list (bullets) / Ordered list (numbers)
<li>List item inside ul or ol
<div>Generic block container (for layout)
<span>Generic inline container (for styling text)
<strong>Bold text β€” also signals importance
<em>Italic text β€” also signals emphasis
<table>Creates a table
<tr> / <th> / <td>Table row / header cell / data cell
<form>Form container for user input
<input type="text">Text input field
<button>Clickable button
<header>Semantic page header
<nav>Navigation links section
<main>Main content of the page
<footer>Page footer section
<!-- comment -->Code comment β€” not shown to the user

FAQ

Common questions about HTML

What is HTML and what is it used for?

HTML stands for HyperText Markup Language. It is the standard language used to create the structure of web pages. Every page on the internet β€” from Google to YouTube to Wikipedia β€” is built with HTML. It defines what content appears on a page and organises it using tags like headings, paragraphs, images and links.

Is HTML a programming language?

Technically, no. HTML is a markup language β€” it describes the structure and content of a page using tags, but it cannot perform calculations, make decisions or store data. JavaScript is the programming language of the web. However, HTML is the essential foundation that everything else is built on.

Do I need to install anything to write HTML?

No. You only need a text editor (even Notepad works) and a web browser. Create a file called index.html, write your HTML, and open it in Chrome or Firefox β€” your browser renders it instantly. Most developers use VS Code for a better experience, but it is completely optional.

What is the difference between HTML and CSS?

HTML handles structure and content β€” it answers "what is on the page?" CSS handles visual presentation β€” it answers "how does it look?" HTML without CSS is plain, unstyled content. CSS without HTML has nothing to style. They are always used together.

How long does it take to learn HTML?

You can learn the core HTML tags and build a basic webpage in a single afternoon. Becoming comfortable with the full tag set, semantic HTML and forms takes a few days of practice. HTML is widely considered the easiest language to start with β€” it is the natural first step for anyone learning web development.

What is semantic HTML?

Semantic HTML means using tags that describe the meaning of the content, not just its appearance. For example, using <header> for the top of a page, <nav> for navigation links and <footer> for the bottom β€” instead of wrapping everything in <div> tags. Semantic HTML is better for accessibility (screen readers), SEO (search engines understand the structure) and code readability.

Ready to build your first webpage?

10 live examples, each one rendered in the browser. No installation, no login, no cost.

Start the HTML tutorial β†’

The Story of HTML

Real history, real companies, and an honest look at where HTMLshines and where it doesn't β€” not just a feature list.

πŸ•°οΈ

Where it came from

HTML was created by Tim Berners-Lee in 1993 while he was working at CERN, as a way to link scientific documents together over the fledgling internet. It was never designed as a programming language β€” it's a markup language, meaning it describes the structure of a document rather than logic or behaviour. The first public specification had barely 20 tags; the current standard, HTML5, has grown to support video, audio, forms, canvas drawing and semantic structure.

🏒

How it’s actually used today

Every single website you've ever visited sends HTML to your browser, even ones built with React or Vue β€” those frameworks ultimately produce HTML for the browser to render. It's also the format used by email clients, e-book readers (EPUB is HTML underneath), and PDF generation tools. There is no serious alternative for describing web page structure; it is the one truly universal language of the web.

βš–οΈ

Strengths & trade-offs

HTML on its own can't calculate anything, respond to a click, or remember data β€” it's pure structure. That's actually a strength: because it does one job, it's stable, forgiving of mistakes, and readable by literally every browser ever made. Its limitation is that real interactivity always needs CSS for appearance and JavaScript for behaviour alongside it.

🧭

What to learn next

After HTML, CSS is the natural next step since the two are almost always written together. Once you're comfortable styling a page, JavaScript lets you make it interactive β€” at that point you have the three languages every website is built from.