← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 790 · 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="maths.html">School news</a>
    (a) href (b) School news (c) maths.html (d) Take the quiz
  2. 2.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
    (a) Cricket is fun. (b) I love mangoes. (c) Hello, world!
  3. 3.Which of these has a closing tag? (a) <h1> (b) <img> (c) <br> (d) <input>
  4. 4.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h4>? (a) <h1> (b) <h3> (c) <h6> (d) <h4>
  5. 5.Which of these is an empty tag? (a) <hr> (b) <p> (c) <title> (d) <ul>
  6. 6.Which of these has a closing tag? (a) <br> (b) <hr> (c) <p> (d) <input>
  7. 7.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow<br>Sky is blue</p>
  8. 8.True or false: <ol> lists things in any order. (a) True (b) False
  9. 9.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a dot . (d) a slash /
  10. 10.🔗 Which words do you click on?
    <a href="quiz.html">Visit the site</a>
    (a) href (b) Maths fun (c) quiz.html (d) Visit the site
  11. 11.🔍 Which is the odd one out? (a) saves our .html files (b) shows pages from the web (c) turns HTML into a page (d) has an address bar
  12. 12.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Litchi</li>
    </ol>
  13. 13.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) </strong> (c) <\strong> (d) <strong>
  14. 14.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 3 (d) 10
  15. 15.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </body> (c) <html> (d) <head>
  16. 16.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
  17. 17.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h2>? (a) <h5> (b) <h3> (c) <h1> (d) <h2>
  18. 18.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <h2>Good morning!</h2>
    <p>Rain today</p>
    <p>My pets</p>
    <p>Fun facts</p>
  19. 19.🔍 Which is the odd one out? (a) saves our .html files (b) is where we type code (c) answers page requests (d) colours code to help us
  20. 20.True or false: <img> has a closing tag. (a) True (b) False
  21. 21.Which of these is an opening tag? (a) </h1> (b) </title> (c) </body> (d) <title>
  22. 22.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="50">
    (a) moon.png (b) width (c) The full moon (d) Our school bus
  23. 23.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Grapes</li>
    </ul>
  24. 24.🔍 Which line is missing its closing tag?
    line 1: <u>My best friend</u>
    line 2: <b>Our school trip
    line 3: <h3>Fun facts</h3>
    (a) line 2 (b) line 3 (c) line 1
  25. 25.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Our school trip</p>
    <p>My pets</p>
    (a) My pets (b) Hello, world! (c) Our school trip
  26. 26.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>My best friend</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) My best friend (b) Cricket is fun. (c) The red kite
  27. 27.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h3>Good morning!</h3>
    <p>Good morning!</p>
    <h2>The red kite</h2>
  28. 28.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  29. 29.🔗 Which words do you click on?
    <a href="contact.html">Play games</a>
    (a) contact.html (b) About us (c) Play games (d) href
  30. 30.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  31. 31.🔗 Which address opens when you click this link?
    <a href="contact.html">Visit the site</a>
    (a) contact.html (b) Visit the site (c) maths.html (d) https://example.com
  32. 32.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ul>
    (a) bullets (b) numbers
  33. 33.🔢 In a basic web page file, which comes first: “<body>” or “</html>”? (a) <body> (b) </html>
  34. 34.🔍 Which line is missing its closing tag?
    line 1: <i>Rain today
    line 2: <h1>My pets</h1>
    line 3: <em>Hello, world!</em>
    (a) line 3 (b) line 1 (c) line 2
  35. 35.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) src (d) href
  36. 36.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
  37. 37.Which of these is an opening tag? (a) </b> (b) </h1> (c) <p> (d) </title>
  38. 38.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
  39. 39.Which of these is a closing tag? (a) <b> (b) <title> (c) <h1> (d) </h1>
  40. 40.🔍 Which line is missing its closing tag?
    line 1: <strong>Hello, world!</strong>
    line 2: <em>I love mangoes.</em>
    line 3: <h2>My pets
    (a) line 2 (b) line 1 (c) line 3

Answer key

  1. School news
  2. Cricket is fun.
  3. <h1>
  4. <h6>
  5. <hr>
  6. <p>
  7. 3
  8. False
  9. a slash /
  10. Visit the site
  11. saves our .html files
  12. 2
  13. </strong>
  14. 6
  15. <!DOCTYPE html>
  16. 350
  17. <h5>
  18. 5
  19. answers page requests
  20. False
  21. <title>
  22. The full moon
  23. 4
  24. line 2
  25. Hello, world!
  26. Cricket is fun.
  27. 3
  28. Yes
  29. Play games
  30. No
  31. contact.html
  32. bullets
  33. <body>
  34. line 1
  35. href
  36. <a>
  37. <p>
  38. True
  39. </h1>
  40. line 3

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