HTML Practice
Practical HTML exercises for self-study and classroom practice.
Build a basic HTML page
Practice exercise: build a valid HTML5 page with correct doctype, head, and body structure.
2Build a navigation menu
Practice exercise: build a semantic navigation menu using <nav> and a list of links.
3Build an image gallery
Practice exercise: place several images with correct alt attributes and captions.
4Build a contact form
Practice exercise: build a contact form with name, email, and message fields.
5Mark up an article semantically
Practice exercise: structure an article using semantic elements like article, section, and header.
6Build a data table
Practice exercise: build a table with correct thead/tbody structure for tabular data.
7Make links accessible
Practice exercise: fix a set of links so they're clear to screen readers and an external link opens safely.
8Build a card with CSS
Practice exercise: build a product card in HTML and link an external stylesheet to it.
9Build a registration form with built-in validation
Practice exercise: build a course sign-up form with fieldset, input types, required, pattern and minlength — validation without JavaScript.
10Mark up a recipe with lists
Practice exercise: turn a plain-text recipe into proper lists — ul, ol, a nested list inside li, ol start and a dl glossary of terms.
11Build a class schedule with merged cells
Practice exercise: build a weekly class schedule with caption, thead, tfoot, scope, rowspan and colspan — a table where every row has the same width.
12Rebuild a page with semantic elements
Practice exercise: turn a page built from divs into semantic HTML with header, nav, main, article, section, aside and footer.
13Build a login form
Practice exercise: fix a broken sign-in form — email and password with autocomplete for password managers, remember me and a forgot-password link.
14Flexbox: header menu and a row of cards
Flexbox practice exercise: put the logo and menu side by side in the header and line course cards up in an equal-height row that wraps on narrow screens.