← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 194 · 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.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  2. 2.📋 What number does the browser show next to “Mango”?
    <ol start="6">
      <li>Litchi</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Guava</li>
    </ol>
  3. 3.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h3> or <h4>? (a) <h5> (b) <h4> (c) <h3> (d) <h2>
  4. 4.🏷️ Which is the closing tag for <p>? (a) <p> (b) <\p> (c) </p> (d) <p/>
  5. 5.🔗 Which address opens when you click this link?
    <a href="games.html">Contact us</a>
    (a) about.html (b) contact.html (c) Contact us (d) games.html
  6. 6.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) editor (c) element (d) attribute
  7. 7.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>The red kite</p>
    <p>Our school trip</p>
    <p>My best friend</p>
  8. 8.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow<br>Birds sing<br>Kites fly high</p>
  9. 9.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
  10. 10.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="350">
    (a) dog.jpg (b) map.png (c) cake.jpg (d) Map of India
  11. 11.🔍 One closing tag is missing. Which one?
    <h3>Our school trip</h3>
    <small>Hello, world!</small>
    <h1>Fun facts
    (a) </h3> (b) </h1> (c) </h2> (d) </small>
  12. 12.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  13. 13.🔗 Where does this link open?
    <a href="games.html" target="_blank">Art corner</a>
    (a) in a new tab (b) in the same tab
  14. 14.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h2>? (a) <h6> (b) <h3> (c) <h5> (d) <h2>
  15. 15.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  16. 16.📋 Which list tag is an ordered list? (a) <li> (b) <ul> (c) <ol>
  17. 17.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  18. 18.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h4>Our school trip</h4>
    <p>The red kite</p>
    <p>Our school trip</p>
    <p>The red kite</p>
  19. 19.Which of these is true of a web server? (a) is where we type code (b) turns HTML into a page (c) answers page requests (d) shows line numbers
  20. 20.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  21. 21.💬 How does an HTML comment end? (a) // (b) */ (c) >> (d) -->
  22. 22.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Fun facts (c) Our school trip (d) I love mangoes.
  23. 23.🔗 Which address opens when you click this link?
    <a href="contact.html">Maths fun</a>
    (a) https://example.com (b) Maths fun (c) contact.html (d) maths.html
  24. 24.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  25. 25.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Kites fly high<br>Rivers flow</p>
  26. 26.Which of these goes in the head? (a) <h1> (b) <meta charset="utf-8"> (c) <ul> (d) <img>
  27. 27.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h1> (c) <br> (d) <h6>
  28. 28.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Orange</li>
      <li>Mango</li>
    </ol>
    (a) bullets (b) numbers
  29. 29.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h6> or <h5>? (a) <h3> (b) <h2> (c) <h5> (d) <h6>
  30. 30.🔢 In a basic web page file, which comes first: “</body>” or “<html>”? (a) </body> (b) <html>
  31. 31.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) width (c) src (d) alt
  32. 32.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>My pets</h2>
    <p>Rain today</p>
    <h4>Cricket is fun.</h4>
    <p>My best friend</p>
  33. 33.💾 A web page file usually ends with which extension? (a) .mp3 (b) .png (c) .txt (d) .html
  34. 34.🔍 One closing tag is missing. Which one?
    <h1>Rain today</h1>
    <p>Hello, world!</p>
    <u>Fun facts
    (a) </p> (b) </small> (c) </u> (d) </h1>
  35. 35.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) in a big heading (d) at the bottom
  36. 36.🏷️ Which is the closing tag for <small>? (a) <small/> (b) </small> (c) <\small> (d) <small>
  37. 37.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <ol> (c) <li>
  38. 38.📄 Can HTML on its own make tables? (a) No (b) Yes
  39. 39.True or false: in <img>, src describes the picture. (a) False (b) True
  40. 40.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <!-- <p>Good morning!</p> -->
    (a) I love mangoes. (b) Cricket is fun. (c) Good morning!

Answer key

  1. No
  2. 7
  3. <h5>
  4. </p>
  5. games.html
  6. element
  7. 1
  8. 4
  9. <ol>
  10. map.png
  11. </h1>
  12. in the head
  13. in a new tab
  14. <h2>
  15. an opening tag
  16. <ol>
  17. a closing tag
  18. 2
  19. answers page requests
  20. No
  21. -->
  22. Fun facts
  23. contact.html
  24. in the body
  25. 3
  26. <meta charset="utf-8">
  27. <h1>
  28. numbers
  29. <h6>
  30. <html>
  31. alt
  32. 3
  33. .html
  34. </u>
  35. on the browser tab
  36. </small>
  37. <li>
  38. Yes
  39. False
  40. Good morning!

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