HTML is the language every web page is built from. If you want to build websites, change how a page is structured or understand what a developer is talking about, HTML is where you start.
This course teaches HTML from the first line to a complete page. Every lesson is short enough to read in a few minutes, has examples you can change and run, and ends with the mistakes people usually make so you can avoid them.
What HTML is
HTML (HyperText Markup Language) describes the structure and meaning of content: this is a heading, this is a paragraph, this is a link, this is a form. Browsers read that structure and show it as a page. CSS then controls how it looks, and JavaScript controls how it behaves. You can read the full explanation in HTML Introduction.
What you will be able to do
By the end of the course you will be able to:
- Write a complete, valid HTML page from an empty file.
- Use headings, text, lists, links, images, tables and media correctly.
- Build forms that are labelled, validated and easy to use.
- Choose semantic elements so pages make sense to search engines and screen readers.
- Add CSS and JavaScript to a page and know where each belongs.
- Check your work with a validator and your browser’s developer tools.
Before you start
You need three things: a computer, a web browser and a plain text editor. You do not need any programming experience. If you can create a text file and open it, you are ready. HTML Editors shows you how to set up in a few minutes.
How to use this course
- Follow the order. Lessons build on each other, so go through the chapters from top to bottom, using the navigation on the left (or the course button on a phone).
- Press Try it. Most code examples have a Try it button. It opens the code in an editor next to a live result. Change something, press Run and see what happens.
- Do the exercises. Exercises and challenges are marked in the navigation. Try them before opening the solution.
- Finish with practice. The last chapter has practice tasks and a final project that put everything together.
- Use the lessons as a reference. Later you can jump straight to a topic, such as tables or forms, when you need to look something up.
lightbulb
Start with the first lesson
New to HTML? Begin with
HTML Introduction and keep going. Already know the basics? Skim the chapter list below and jump to the chapter you need.
Frequently Asked Questions
HTML Frequently Asked Questions
Is HTML a programming language?
expand_more
No, HTML is a markup language. It does not include conditional logic, loops, memory management, or mathematical computations. It defines the structural hierarchy and semantic meaning of documents.
What is HTML5?
expand_more
HTML5 is the fifth and current major version of the HTML standard. Maintained as a Living Standard by the WHATWG, it introduced native video/audio, semantic landmark tags, canvas graphics, and responsive form controls.
What is the difference between HTML and CSS?
expand_more
HTML dictates what content is (structure and semantics), while CSS dictates how content looks (layout, colors, fonts, responsive breakpoints, and animations).
What is semantic HTML?
expand_more
Semantic HTML means utilizing elements that inherently communicate their meaning to machines and humans (e.g. <article>, <nav>, <header>) rather than generic uninformative tags like <div>.
What does the DOCTYPE declaration do?
expand_more
The <!DOCTYPE html> declaration tells the browser engine to render the document in modern Standards Mode according to HTML5 specifications, preventing backward-compatibility Quirks Mode.
What is the difference between div and section?
expand_more
A <div> has zero semantic meaning and is strictly a styling container. A <section> represents a thematic grouping of content, typically introduced by an explicit heading.
Why is the alt attribute important?
expand_more
The alt attribute supplies alternative text for screen reader users and displays fallback text when network conditions prevent image assets from downloading.
What is the difference between id and class?
expand_more
An id must be unique across the entire document and can only be used once per page. A class can be reused across dozens of different elements.
What are HTML5 semantic elements?
expand_more
Key semantic elements include <header>, <nav>, <main>, <article>, <section>, <aside>, <footer>, <figure>, <figcaption>, and <time>.
How can I make HTML accessible?
expand_more
Use semantic elements first, associate all form inputs with labels, provide descriptive alt text for images, maintain a strict heading hierarchy, and ensure full keyboard navigation.
What is the difference between HTML and the DOM?
expand_more
HTML is the raw source text file returned by the server. The DOM (Document Object Model) is the in-memory tree representation created by the browser after parsing the HTML.
How do I validate HTML?
expand_more
Submit your code or live page URL to the official W3C Nu HTML Validator at validator.w3.org/nu to identify syntax errors, invalid nesting, and missing attributes.