← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 244 · 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.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <h1> (d) <link rel="stylesheet">
  2. 2.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
  3. 3.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ul>
  4. 4.True or false: a web browser hosts websites online. (a) False (b) True
  5. 5.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Mango</li>
    </ul>
  6. 6.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) width (d) alt
  7. 7.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  8. 8.🔍 One closing tag is missing. Which one?
    <h3>My best friend</h3>
    <em>I love mangoes.
    <h1>Good morning!</h1>
    (a) </h1> (b) </b> (c) </em> (d) </h3>
  9. 9.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <p>My best friend</p>
  10. 10.🔍 Which line is missing its closing tag?
    line 1: <h2>Our school trip</h2>
    line 2: <strong>Hello, world!
    line 3: <b>Cricket is fun.</b>
    (a) line 3 (b) line 2 (c) line 1
  11. 11.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="400">
    (a) Map of India (b) A red kite (c) kite.png (d) width
  12. 12.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>The red kite</p> -->
  13. 13.🔗 Which words do you click on?
    <a href="news.html">Maths fun</a>
    (a) news.html (b) Art corner (c) Maths fun (d) href
  14. 14.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  15. 15.Which of these is true of a web server? (a) sends pages over the net (b) has an address bar (c) shows pages from the web (d) opens web pages for us
  16. 16.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  17. 17.Which of these goes in the head? (a) <h1> (b) <p> (c) <ul> (d) <title>
  18. 18.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Roses are red<br>Kites fly high</p>
  19. 19.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>My pets</p>
    <p>Hello, world!</p>
  20. 20.True or false: <li> lists steps in order. (a) True (b) False
  21. 21.Which of these is an opening tag? (a) </p> (b) </h1> (c) <body> (d) </body>
  22. 22.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ol>
  23. 23.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h5> or <h2>? (a) <h1> (b) <h4> (c) <h2> (d) <h5>
  24. 24.💬 How does an HTML comment end? (a) >> (b) */ (c) // (d) -->
  25. 25.True or false: <ol> is one item of a list. (a) True (b) False
  26. 26.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  27. 27.Which of these is true of a web browser? (a) opens web pages for us (b) is where we type code (c) colours code to help us (d) sends pages over the net
  28. 28.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
  29. 29.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  30. 30.True or false: HTML on its own can make bullet lists. (a) False (b) True
  31. 31.True or false: a web browser shows line numbers. (a) False (b) True
  32. 32.🔗 Which words do you click on?
    <a href="contact.html">Visit the site</a>
    (a) Maths fun (b) contact.html (c) href (d) Visit the site
  33. 33.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) makes a list (d) starts a new line
  34. 34.Which of these is a closing tag? (a) <h1> (b) <b> (c) </title> (d) <title>
  35. 35.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  36. 36.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <h2>Rain today</h2>
  37. 37.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  38. 38.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  39. 39.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h5> (d) <h1>
  40. 40.True or false: HTML on its own can make headings. (a) False (b) True

Answer key

  1. <h1>
  2. <img>
  3. 3
  4. False
  5. 3
  6. alt
  7. a closing tag
  8. </em>
  9. 3
  10. line 2
  11. A red kite
  12. 1
  13. Maths fun
  14. an empty tag
  15. sends pages over the net
  16. an opening tag
  17. <title>
  18. 3
  19. 1
  20. False
  21. <body>
  22. 4
  23. <h5>
  24. -->
  25. False
  26. has a closing tag
  27. opens web pages for us
  28. a web browser
  29. an opening tag
  30. True
  31. False
  32. Visit the site
  33. starts a new line
  34. </title>
  35. No
  36. 4
  37. False
  38. Yes
  39. <h5>
  40. True

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