Home / Learn HTML / HTML Practice Challenges

HTML Practice Challenges

Learn by doing. Each challenge gives you starter code and a goal. Write your own answer in the editor.

In shortRead the goal, change the code, press Run. Compare with the hint if you get stuck.

About this lesson

Reading is not enough: you learn HTML by typing it. These challenges go from beginner to hard. Try each one yourself in the editor before looking at any hint.

Write your answer in the editor and press Check my answer. The page tests your code against the goal and shows what is right and what is missing. Solved challenges are saved in your browser and earn you badges.

Level 1: Beginner

Challenge 1: your name as a headingAuto-checked

Goal: Show your name as the biggest heading.

  • Has an h1
  • The h1 has some text
Challenge 2: a paragraph about youAuto-checked

Goal: Add a paragraph with two sentences.

  • Has a paragraph
  • The paragraph has two sentences
Challenge 3: a shopping listAuto-checked

Goal: Add a bullet list with 4 items.

  • Has a bullet list (ul)
  • Has 4 list items
Challenge 4: a link to GoogleAuto-checked

Goal: Make a link to google.com that opens in a new tab.

  • Link goes to google.com
  • Opens in a new tab
  • Link has text
Challenge 5: show a pictureAuto-checked

Goal: Show https://placehold.co/200x100 and give it good alt text.

  • Image source is placehold.co
  • Alt text has at least 3 letters

Level 2: Easy

Challenge 6: a table of friendsAuto-checked

Goal: Make a table with the columns Name and City and 3 rows of friends.

  • Has a table
  • Has 2 or more header cells (th)
  • Has 4 rows in total
Challenge 7: a numbered recipeAuto-checked

Goal: Write an ordered list of 5 steps to make tea.

  • Has an ordered list (ol)
  • Has 5 steps
Challenge 8: a contact formAuto-checked

Goal: Make a form with a name box, an email box and a submit button. Connect each label to its box.

  • Has a form
  • Has a name input
  • Has an email input
  • Has a submit button
  • Has 2 labels connected with for
Challenge 9: a menuAuto-checked

Goal: Make a nav with 3 links.

  • Has a nav element
  • Has 3 links inside nav
Challenge 10: a meaningful page layoutAuto-checked

Goal: Build a page with a header, a main and a footer in this order.

  • Has a header
  • Has a main
  • Has a footer
  • Header comes before main
  • Main comes before footer

Level 3: Medium

Challenge 11: a complete pageAuto-checked

Goal: Write a full page with a doctype, language, charset, viewport, a title and one heading.

  • Starts with the doctype
  • html has a lang attribute
  • Has meta charset
  • Has the viewport meta
  • Title has text
  • Has one h1
Challenge 12: a figure with a captionAuto-checked

Goal: Show a picture with a caption using the right elements.

  • Has a figure with an image
  • Image has alt text
  • Has a figcaption inside the figure
Challenge 13: a FAQ without JavaScriptAuto-checked

Goal: Make 2 questions that open and close, using details and summary.

  • Has 2 details elements
  • Each has a summary
Challenge 14: a video playerAuto-checked

Goal: Add a video with the play controls and a poster picture.

  • Has a video with controls
  • Has a poster attribute
  • Has a video source
Challenge 15: a dropdownAuto-checked

Goal: Make a labelled dropdown with 3 city options.

  • Has a select
  • Has 3 options
  • Label is connected with for
Challenge 16: a glossaryAuto-checked

Goal: Make a description list with 2 terms and their meanings.

  • Has a dl
  • Has 2 terms (dt)
  • Has 2 descriptions (dd)
Challenge 17: an embedded pageAuto-checked

Goal: Embed a page with an iframe that has a title.

  • Has an iframe
  • Iframe has a src
  • Iframe has a title
My notes
Ask a question about this lesson