← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 533 · 40 questions
TalentJR

Code tip (Read the code like a browser): Find the topic of the question: tags, headings, lists, links, images, structure or comments. Read the code line by line, the way a browser would. Count carefully: tags opened and closed, items, lines, paragraphs.

NameDateTime takenScore ___ / 40
  1. 1.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  2. 2.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h5> or <h6>? (a) <h6> (b) <h5> (c) <h1> (d) <h3>
  3. 3.True or false: a code editor shows line numbers. (a) True (b) False
  4. 4.Which of these is a closing tag? (a) <title> (b) </body> (c) <p> (d) <li>
  5. 5.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <table> (c) <meta charset="utf-8"> (d) <title>
  6. 6.Which of these is an empty tag? (a) <title> (b) <input> (c) <ul> (d) <p>
  7. 7.🔗 Which address opens when you click this link?
    <a href="quiz.html">Take the quiz</a>
    (a) Take the quiz (b) games.html (c) about.html (d) quiz.html
  8. 8.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h6> or <h3>? (a) <h3> (b) <h1> (c) <h6> (d) <h4>
  9. 9.Which of these is an opening tag? (a) </b> (b) </p> (c) </h1> (d) <h1>
  10. 10.🔗 Which address opens when you click this link?
    <a href="quiz.html">About us</a>
    (a) quiz.html (b) about.html (c) About us (d) games.html
  11. 11.🔍 One closing tag is missing. Which one?
    <strong>Our school trip</strong>
    <h3>Cricket is fun.
    <p>Fun facts</p>
    (a) </h3> (b) </h2> (c) </strong> (d) </p>
  12. 12.🔍 Which line is missing its closing tag?
    line 1: <strong>Our school trip</strong>
    line 2: <small>The red kite</small>
    line 3: <h3>Hello, world!
    (a) line 1 (b) line 3 (c) line 2
  13. 13.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
  14. 14.True or false: in <img>, alt is read by screen readers. (a) True (b) False
  15. 15.Which of these is an opening tag? (a) <body> (b) </b> (c) </p> (d) </title>
  16. 16.🔗 What does HyperText mean? (a) very big text (b) text in colour (c) secret text (d) text with links
  17. 17.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  18. 18.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  19. 19.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to load it faster (c) to colour it (d) to make it bigger
  20. 20.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the doctype (d) the head
  21. 21.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h3> or <h5>? (a) <h6> (b) <h5> (c) <h3> (d) <h4>
  22. 22.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) index.html (c) Riya’s Recipes (d) Match report
  23. 23.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  24. 24.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) width (b) The full moon (c) A happy dog (d) dog.jpg
  25. 25.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  26. 26.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  27. 27.🔢 In a basic web page file, which comes first: “<head>” or “<html>”? (a) <html> (b) <head>
  28. 28.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  29. 29.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  30. 30.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
    (a) kite.png (b) A tiger asleep (c) map.png (d) tiger.jpg
  31. 31.True or false: HTML on its own cannot make headings. (a) False (b) True
  32. 32.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  33. 33.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <ul> (d) <br>
  34. 34.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h3> or <h5>? (a) <h2> (b) <h4> (c) <h5> (d) <h3>
  35. 35.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <link about.html>
  36. 36.True or false: in <img>, alt tells which image to load. (a) True (b) False
  37. 37.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="400">
    (a) Birthday cake (b) width (c) Map of India (d) map.png
  38. 38.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    <p>My pets</p>
  39. 39.🔍 One closing tag is missing. Which one?
    <i>Cricket is fun.</i>
    <h1>Rain today</h1>
    <u>My pets
    (a) </u> (b) </i> (c) </h3> (d) </h1>
  40. 40.Which of these is true of a code editor? (a) opens web pages for us (b) saves our .html files (c) stores a website’s files (d) shows pages from the web

Answer key

  1. in the head
  2. <h1>
  3. True
  4. </body>
  5. <table>
  6. <input>
  7. quiz.html
  8. <h1>
  9. <h1>
  10. quiz.html
  11. </h3>
  12. line 3
  13. False
  14. True
  15. <body>
  16. text with links
  17. <ul>
  18. has a closing tag
  19. to describe the image
  20. the body
  21. <h3>
  22. Riya’s Recipes
  23. an empty tag
  24. A happy dog
  25. Yes
  26. No
  27. <html>
  28. No
  29. Yes
  30. tiger.jpg
  31. False
  32. an opening tag
  33. <ol>
  34. <h2>
  35. <a href="about.html">
  36. False
  37. Map of India
  38. 1
  39. </u>
  40. saves our .html files

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids