HTML Practice

Practical HTML exercises for self-study and classroom practice.

1

Build a basic HTML page

Practice exercise: build a valid HTML5 page with correct doctype, head, and body structure.

2

Build a navigation menu

Practice exercise: build a semantic navigation menu using <nav> and a list of links.

3

Build an image gallery

Practice exercise: place several images with correct alt attributes and captions.

4

Build a contact form

Practice exercise: build a contact form with name, email, and message fields.

5

Mark up an article semantically

Practice exercise: structure an article using semantic elements like article, section, and header.

6

Build a data table

Practice exercise: build a table with correct thead/tbody structure for tabular data.

7

Make links accessible

Practice exercise: fix a set of links so they're clear to screen readers and an external link opens safely.

8

Build a card with CSS

Practice exercise: build a product card in HTML and link an external stylesheet to it.

9

Build 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.

10

Mark 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.

11

Build 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.

12

Rebuild 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.

13

Build 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.

14

Flexbox: 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.

Related tools