← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 432 · 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 words do you click on?
    <a href="about.html">Take the quiz</a>
    (a) href (b) Take the quiz (c) Play games (d) about.html
  2. 2.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h2>? (a) <h5> (b) <h1> (c) <h2> (d) <h4>
  3. 3.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) height (c) alt (d) src
  4. 4.True or false: <ol> goes inside ul or ol. (a) True (b) False
  5. 5.🔍 Which is the odd one out? (a) answers page requests (b) hosts websites online (c) shows line numbers (d) stores a website’s files
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="300">
    (a) moon.png (b) Our school bus (c) width (d) The full moon
  7. 7.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h5> or <h4>? (a) <h4> (b) <h3> (c) <h2> (d) <h5>
  8. 8.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Good morning!</p>
    <p>Fun facts</p>
    (a) I love mangoes. (b) Fun facts (c) Good morning!
  9. 9.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h1> or <h4>? (a) <h1> (b) <h4> (c) <h3> (d) <h2>
  10. 10.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
    (a) Good morning! (b) My pets (c) Fun facts
  11. 11.🔍 One closing tag is missing. Which one?
    <em>My pets</em>
    <strong>Fun facts</strong>
    <h1>Hello, world!
    (a) </em> (b) </h1> (c) </strong> (d) </i>
  12. 12.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow<br>Kites fly high<br>Birds sing<br>Stars shine</p>
  13. 13.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h1> (d) <h3>
  14. 14.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>My best friend</p>
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
  15. 15.True or false: in <img>, src tells which image to load. (a) True (b) False
  16. 16.📋 Which list suits a shopping list in any order? (a) <br> (b) <ul> (c) <ol> (d) <hr>
  17. 17.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  18. 18.True or false: in <img>, width sets how wide it is. (a) True (b) False
  19. 19.True or false: in <img>, alt names the picture file. (a) True (b) False
  20. 20.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Our school trip</p>
    <p>Good morning!</p>
    (a) Good morning! (b) I love mangoes. (c) Our school trip
  21. 21.True or false: <br> is an empty tag. (a) True (b) False
  22. 22.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
  23. 23.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Jamun</li>
    </ul>
  24. 24.True or false: <title> has a closing tag. (a) True (b) False
  25. 25.Which of these is an opening tag? (a) </li> (b) <title> (c) </body> (d) </p>
  26. 26.🔗 Which address opens when you click this link?
    <a href="news.html">School news</a>
    (a) School news (b) news.html (c) games.html (d) quiz.html
  27. 27.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a closing tag (d) a comment
  28. 28.📄 Can HTML on its own make a form? (a) Yes (b) No
  29. 29.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Fun facts</p> -->
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    <p>The red kite</p>
  30. 30.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ol>
  31. 31.📄 Can HTML on its own count button clicks? (a) Yes (b) No
  32. 32.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
  33. 33.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) alt (d) height
  34. 34.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h4>Cricket is fun.</h4>
    <h4>My best friend</h4>
    <p>Hello, world!</p>
    <h2>My best friend</h2>
  35. 35.📋 What number does the browser show next to “Banana”?
    <ol start="3">
      <li>Mango</li>
      <li>Orange</li>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ol>
  36. 36.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h5>? (a) <h4> (b) <h5> (c) <h1> (d) <h2>
  37. 37.Which of these is an opening tag? (a) </p> (b) </li> (c) <p> (d) </title>
  38. 38.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) <head> (c) </head> (d) <!DOCTYPE html>
  39. 39.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
  40. 40.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h4>? (a) <h5> (b) <h1> (c) <h4> (d) <h2>

Answer key

  1. Take the quiz
  2. <h1>
  3. width
  4. False
  5. shows line numbers
  6. The full moon
  7. <h5>
  8. I love mangoes.
  9. <h1>
  10. My pets
  11. </h1>
  12. 5
  13. <h6>
  14. 3
  15. True
  16. <ul>
  17. an opening tag
  18. True
  19. False
  20. I love mangoes.
  21. True
  22. -->
  23. 2
  24. True
  25. <title>
  26. news.html
  27. an attribute
  28. Yes
  29. 2
  30. 4
  31. No
  32. <ul>
  33. alt
  34. 4
  35. 7
  36. <h1>
  37. <p>
  38. <!DOCTYPE html>
  39. <ol>
  40. <h1>

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