← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 889 · 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 of these goes in the body? (a) <link rel="stylesheet"> (b) <meta charset="utf-8"> (c) <img> (d) <style>
  2. 2.True or false: a code editor shows pages from the web. (a) True (b) False
  3. 3.True or false: <img> goes in the head. (a) True (b) False
  4. 4.True or false: HTML on its own can keep a high score. (a) True (b) False
  5. 5.True or false: <li> goes inside ul or ol. (a) False (b) True
  6. 6.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h5> or <h2>? (a) <h1> (b) <h5> (c) <h2> (d) <h6>
  7. 7.Which of these is true of a web browser? (a) sends pages over the net (b) opens web pages for us (c) saves our .html files (d) stores a website’s files
  8. 8.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="250">
  9. 9.True or false: <p> goes in the body. (a) False (b) True
  10. 10.True or false: a web browser is where we type code. (a) False (b) True
  11. 11.Which of these is an opening tag? (a) </h1> (b) </p> (c) </title> (d) <body>
  12. 12.True or false: a web server sends pages over the net. (a) False (b) True
  13. 13.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  14. 14.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h6>? (a) <h1> (b) <h6> (c) <h5> (d) <h3>
  15. 15.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow<br>Roses are red</p>
  16. 16.True or false: in <img>, src is read by screen readers. (a) True (b) False
  17. 17.📄 Can HTML on its own pick a random number? (a) No (b) Yes
  18. 18.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h3> or <h5>? (a) <h2> (b) <h4> (c) <h3> (d) <h5>
  19. 19.📄 Where does the text of <title> appear? (a) at the bottom (b) on the browser tab (c) in a big heading (d) nowhere
  20. 20.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a src="about.html">
  21. 21.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h4>My best friend</h4>
    <p>Fun facts</p>
  22. 22.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>My pets</p>
    <h2>My pets</h2>
    <p>Fun facts</p>
    <p>My pets</p>
  23. 23.True or false: HTML on its own cannot make headings. (a) True (b) False
  24. 24.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) height (c) width (d) src
  25. 25.True or false: <ul> is an unordered list. (a) True (b) False
  26. 26.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h3> (d) <h1>
  27. 27.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Orange</li>
    </ul>
    (a) numbers (b) bullets
  28. 28.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) index.html (c) My Hobbies (d) Easy snacks
  29. 29.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>My best friend</p>
  30. 30.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h6> or <h1>? (a) <h6> (b) <h5> (c) <h1> (d) <h3>
  31. 31.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h2>? (a) <h6> (b) <h3> (c) <h1> (d) <h2>
  32. 32.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
  33. 33.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Our school trip</p> -->
  34. 34.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
  35. 35.💬 How does an HTML comment end? (a) // (b) */ (c) --> (d) >>
  36. 36.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to make it bigger (c) to colour it (d) to describe the image
  37. 37.🔗 Where does this link open?
    <a href="contact.html">About us</a>
    (a) in a new tab (b) in the same tab
  38. 38.🔢 In a basic web page file, which comes first: “</head>” or “</body>”? (a) </body> (b) </head>
  39. 39.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<head>”? (a) <!DOCTYPE html> (b) <head>
  40. 40.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <img> (d) <p>

Answer key

  1. <img>
  2. False
  3. False
  4. False
  5. True
  6. <h6>
  7. opens web pages for us
  8. 250
  9. True
  10. False
  11. <body>
  12. True
  13. in the head
  14. <h1>
  15. 3
  16. False
  17. No
  18. <h5>
  19. on the browser tab
  20. <a href="about.html">
  21. 2
  22. 4
  23. False
  24. height
  25. True
  26. <h6>
  27. bullets
  28. My Hobbies
  29. 1
  30. <h1>
  31. <h6>
  32. to leave notes
  33. 1
  34. 2
  35. -->
  36. to describe the image
  37. in the same tab
  38. </head>
  39. <!DOCTYPE html>
  40. <a>

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