← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 128 · 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 tag goes around each item of a list? (a) <li> (b) <p> (c) <ul> (d) <ol>
  2. 2.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  3. 3.True or false: a web server answers page requests. (a) True (b) False
  4. 4.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>My best friend</p> -->
    <p>My pets</p>
  5. 5.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>The red kite</h2>
    <h2>Fun facts</h2>
  6. 6.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<body>”? (a) <body> (b) <!DOCTYPE html>
  7. 7.True or false: in <img>, width tells which image to load. (a) False (b) True
  8. 8.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Orange</li>
    </ol>
    (a) bullets (b) numbers
  9. 9.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 6 (d) 3
  10. 10.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dollar $ (c) a hash # (d) a dot .
  11. 11.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Rain today</p>
    <h2>My pets</h2>
  12. 12.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  13. 13.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="350">
    (a) cake.jpg (b) dog.jpg (c) map.png (d) Map of India
  14. 14.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) at the bottom (d) on the browser tab
  15. 15.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) src (d) width
  16. 16.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <!-- <p>Good morning!</p> -->
  17. 17.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
  18. 18.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="100">
    (a) kite.png (b) tiger.jpg (c) An old fort (d) fort.jpg
  19. 19.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) <body> (c) </html> (d) </head>
  20. 20.Which of these has a closing tag? (a) <meta> (b) <br> (c) <img> (d) <h1>
  21. 21.🖼️ Which tag puts a picture on a page? (a) <img> (b) <p> (c) <a> (d) <pic>
  22. 22.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->
    <p>Rain today</p>
  23. 23.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <h3> (d) <p>
  24. 24.Which of these is an opening tag? (a) </body> (b) </p> (c) </b> (d) <li>
  25. 25.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <a href="about.html">
  26. 26.💬 How does an HTML comment end? (a) --> (b) // (c) >> (d) */
  27. 27.🏷️ Which is the closing tag for <b>? (a) <\b> (b) <b> (c) </b> (d) <b/>
  28. 28.Which of these is a closing tag? (a) <title> (b) <h1> (c) <body> (d) </p>
  29. 29.Which of these has a closing tag? (a) <input> (b) <br> (c) <b> (d) <img>
  30. 30.🔍 One closing tag is missing. Which one?
    <i>I love mangoes.</i>
    <small>Hello, world!
    <h1>Good morning!</h1>
    (a) </h1> (b) </b> (c) </i> (d) </small>
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="100">
    (a) Birthday cake (b) width (c) Map of India (d) map.png
  32. 32.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
    (a) My pets (b) Fun facts (c) Hello, world! (d) Good morning!
  33. 33.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
  34. 34.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <table> (c) <meta charset="utf-8"> (d) <title>
  35. 35.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>My best friend</p>
    <p>Our school trip</p>
    <p>Our school trip</p>
    <p>The red kite</p>
  36. 36.🏷️ Every HTML tag starts with which sign? (a) { (b) < (c) ( (d) [
  37. 37.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  38. 38.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="50">
    (a) map.png (b) A red kite (c) kite.png (d) cake.jpg
  39. 39.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h1> (d) <h5>
  40. 40.Which of these is a closing tag? (a) <p> (b) <b> (c) </li> (d) <h1>

Answer key

  1. <li>
  2. Yes
  3. True
  4. 2
  5. 1
  6. <!DOCTYPE html>
  7. False
  8. numbers
  9. 6
  10. a slash /
  11. 2
  12. has a closing tag
  13. map.png
  14. on the browser tab
  15. alt
  16. 2
  17. opens it in a new tab
  18. fort.jpg
  19. </html>
  20. <h1>
  21. <img>
  22. 3
  23. <h6>
  24. <li>
  25. <a href="about.html">
  26. -->
  27. </b>
  28. </p>
  29. <b>
  30. </small>
  31. Map of India
  32. My pets
  33. <!--
  34. <table>
  35. 1
  36. <
  37. an opening tag
  38. kite.png
  39. <h1>
  40. </li>

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