← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 69 · 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.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Stars shine</p>
  2. 2.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  3. 3.🔗 Which address opens when you click this link?
    <a href="news.html">Take the quiz</a>
    (a) games.html (b) quiz.html (c) Take the quiz (d) news.html
  4. 4.Which of these is an opening tag? (a) </body> (b) </b> (c) </p> (d) <b>
  5. 5.True or false: HTML on its own can add up two numbers. (a) True (b) False
  6. 6.True or false: HTML on its own cannot run a game loop. (a) True (b) False
  7. 7.🔗 Where does this link open?
    <a href="contact.html">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  8. 8.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <p> (d) <img>
  9. 9.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="350">
  10. 10.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
    (a) bullets (b) numbers
  11. 11.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  12. 12.True or false: <meta> has a closing tag. (a) False (b) True
  13. 13.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <img> (d) <a>
  14. 14.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    <h2>My best friend</h2>
  15. 15.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) element (d) editor
  16. 16.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="350">
    (a) An old fort (b) A tiger asleep (c) width (d) fort.jpg
  17. 17.🔗 Which address opens when you click this link?
    <a href="about.html">Contact us</a>
    (a) https://example.com (b) Contact us (c) about.html (d) contact.html
  18. 18.🔍 One closing tag is missing. Which one?
    <small>Fun facts
    <h2>Good morning!</h2>
    <i>Rain today</i>
    (a) </i> (b) </small> (c) </b> (d) </h2>
  19. 19.True or false: in <img>, src shows if the image fails. (a) False (b) True
  20. 20.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Hello, world! (b) The red kite (c) Cricket is fun.
  21. 21.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <table> (c) <style> (d) <meta charset="utf-8">
  22. 22.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>The red kite</p> -->
  23. 23.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="50">
  24. 24.True or false: <br> has a closing tag. (a) True (b) False
  25. 25.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ol>
  26. 26.True or false: <b> has a closing tag. (a) True (b) False
  27. 27.True or false: a web server hosts websites online. (a) False (b) True
  28. 28.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="350">
    (a) Map of India (b) map.png (c) width (d) Birthday cake
  29. 29.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h5>? (a) <h2> (b) <h6> (c) <h5> (d) <h1>
  30. 30.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <!-- <p>Our school trip</p> -->
    (a) I love mangoes. (b) Our school trip (c) The red kite
  31. 31.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <p>My best friend</p>
  32. 32.📝 What does <hr> draw? (a) a table (b) a picture (c) a line across the page (d) a link
  33. 33.True or false: HTML on its own can make links to pages. (a) True (b) False
  34. 34.True or false: a web server shows line numbers. (a) True (b) False
  35. 35.Which of these goes in the head? (a) <ul> (b) <img> (c) <h1> (d) <meta charset="utf-8">
  36. 36.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  37. 37.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
  38. 38.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Fun facts</p>
    <h2>Good morning!</h2>
  39. 39.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
  40. 40.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h3> or <h4>? (a) <h4> (b) <h6> (c) <h2> (d) <h3>

Answer key

  1. 2
  2. a closing tag
  3. news.html
  4. <b>
  5. False
  6. True
  7. in the same tab
  8. <img>
  9. 350
  10. numbers
  11. a closing tag
  12. False
  13. <a>
  14. 5
  15. element
  16. An old fort
  17. about.html
  18. </small>
  19. False
  20. Cricket is fun.
  21. <table>
  22. 2
  23. 50
  24. False
  25. 2
  26. True
  27. True
  28. Map of India
  29. <h1>
  30. Our school trip
  31. 3
  32. a line across the page
  33. True
  34. False
  35. <meta charset="utf-8">
  36. has a closing tag
  37. <!DOCTYPE html>
  38. 2
  39. <ol>
  40. <h2>

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