HTML exercises with solutions

48 practice problems from the 16 lessons of the HTML: Build Web Pages course, in lesson order and from easy to hard inside each lesson. Open a problem, write your code and press Submit: the tests run in your browser and nothing is sent to a server.

16 easy problems 16 medium problems 16 hard problems

What HTML is and how a browser reads it

3 problems · Read the lesson

The skeleton of every page

3 problems · Read the lesson

Headings, paragraphs and text

3 problems · Read the lesson

3 problems · Read the lesson

Images and why alt text matters

3 problems · Read the lesson

Lists for steps, items and definitions

3 problems · Read the lesson

Tables for data that has rows and columns

3 problems · Read the lesson

Forms: asking the user for information

3 problems · Read the lesson

The right control for each question

3 problems · Read the lesson

Checking answers before they are sent

3 problems · Read the lesson

Semantic HTML: elements that mean something

3 problems · Read the lesson

Accessibility: pages that work for everyone

3 problems · Read the lesson

Audio, video and embedded pages

3 problems · Read the lesson

The head: titles, search results and sharing

3 problems · Read the lesson

Global attributes and custom data

3 problems · Read the lesson

Built-in interactive elements

3 problems · Read the lesson