← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 181 · 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 text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) Our school trip (c) My best friend
  2. 2.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
    <p>Our school trip</p>
  3. 3.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h3> or <h6>? (a) <h5> (b) <h6> (c) <h4> (d) <h3>
  4. 4.🔢 In a basic web page file, which comes first: “</body>” or “<head>”? (a) <head> (b) </body>
  5. 5.📋 What number does the browser show next to “Banana”?
    <ol start="3">
      <li>Mango</li>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Banana</li>
    </ol>
  6. 6.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  7. 7.🔗 Which address opens when you click this link?
    <a href="quiz.html">Play games</a>
    (a) games.html (b) Play games (c) quiz.html (d) about.html
  8. 8.🔗 Where does this link open?
    <a href="news.html">Contact us</a>
    (a) in a new tab (b) in the same tab
  9. 9.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h5> or <h2>? (a) <h4> (b) <h6> (c) <h2> (d) <h5>
  10. 10.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
  11. 11.Which of these is true of a web browser? (a) saves our .html files (b) colours code to help us (c) sends pages over the net (d) opens web pages for us
  12. 12.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) height (c) width (d) alt
  13. 13.Which of these goes in the body? (a) <style> (b) <h1> (c) <link rel="stylesheet"> (d) <meta charset="utf-8">
  14. 14.Which of these is an empty tag? (a) <li> (b) <title> (c) <p> (d) <meta>
  15. 15.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
  16. 16.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>Fun facts</p> -->
  17. 17.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  18. 18.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
  19. 19.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>My pets</p>
    <h4>Fun facts</h4>
  20. 20.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="250">
  21. 21.🔍 One closing tag is missing. Which one?
    <strong>Cricket is fun.</strong>
    <small>Our school trip
    <em>Rain today</em>
    (a) </strong> (b) </em> (c) </small> (d) </b>
  22. 22.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  23. 23.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
  24. 24.True or false: <ul> shows 1, 2, 3 numbers. (a) False (b) True
  25. 25.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Stars shine</p>
  26. 26.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h1> or <h6>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
  27. 27.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Jamun</li>
    </ul>
  28. 28.Which of these is an opening tag? (a) <li> (b) </p> (c) </h1> (d) </title>
  29. 29.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h4> or <h1>? (a) <h4> (b) <h2> (c) <h1> (d) <h5>
  30. 30.True or false: <a> goes in the head. (a) True (b) False
  31. 31.Which of these has a closing tag? (a) <br> (b) <input> (c) <ul> (d) <meta>
  32. 32.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) at the bottom (d) on the browser tab
  33. 33.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  34. 34.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Cricket is fun. (b) Our school trip (c) Hello, world! (d) The red kite
  35. 35.💬 How does an HTML comment start? (a) /* (b) // (c) # (d) <!--
  36. 36.🔗 Where does this link open?
    <a href="https://example.com">Maths fun</a>
    (a) in the same tab (b) in a new tab
  37. 37.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="250">
    (a) A red kite (b) cake.jpg (c) kite.png (d) map.png
  38. 38.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) <body>
  39. 39.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <h2/> (c) <\h2> (d) <h2>
  40. 40.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) height (c) alt (d) src

Answer key

  1. My best friend
  2. 2
  3. <h3>
  4. <head>
  5. 6
  6. an opening tag
  7. quiz.html
  8. in the same tab
  9. <h2>
  10. <a>
  11. opens web pages for us
  12. alt
  13. <h1>
  14. <meta>
  15. 5
  16. 1
  17. Yes
  18. 6
  19. 2
  20. 250
  21. </small>
  22. has a closing tag
  23. 1
  24. False
  25. 2
  26. <h6>
  27. 3
  28. <li>
  29. <h1>
  30. False
  31. <ul>
  32. on the browser tab
  33. has a closing tag
  34. Cricket is fun.
  35. <!--
  36. in the same tab
  37. kite.png
  38. <!DOCTYPE html>
  39. </h2>
  40. width

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