← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 164 · 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 is used for the main title on a page? (a) <p> (b) <h6> (c) <br> (d) <h1>
  2. 2.Which of these goes in the body? (a) <a> (b) <meta charset="utf-8"> (c) <link rel="stylesheet"> (d) <style>
  3. 3.True or false: HTML on its own can make bullet lists. (a) True (b) False
  4. 4.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as 5 spaces (c) as a dot (d) as a new line
  5. 5.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="150">
    (a) Map of India (b) dog.jpg (c) cake.jpg (d) map.png
  6. 6.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) src (d) id
  7. 7.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) src (c) height (d) alt
  8. 8.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  9. 9.🔍 One closing tag is missing. Which one?
    <h1>I love mangoes.
    <i>My pets</i>
    <u>Cricket is fun.</u>
    (a) </b> (b) </i> (c) </h1> (d) </u>
  10. 10.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
  11. 11.🔗 Which address opens when you click this link?
    <a href="about.html">Art corner</a>
    (a) https://example.com (b) contact.html (c) Art corner (d) about.html
  12. 12.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h5>? (a) <h5> (b) <h4> (c) <h3> (d) <h2>
  13. 13.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Fun facts</p> -->
  14. 14.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>My pets</p> -->
    <!-- <p>Fun facts</p> -->
    <!-- <p>The red kite</p> -->
    <p>My best friend</p>
  15. 15.Which of these goes in the head? (a) <a> (b) <meta charset="utf-8"> (c) <p> (d) <ul>
  16. 16.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="200">
  17. 17.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  18. 18.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  19. 19.🏷️ Every HTML tag starts with which sign? (a) < (b) [ (c) { (d) (
  20. 20.🌐 Which one stores a website’s files? (a) a web server (b) a web browser (c) a code editor
  21. 21.Which of these is true of a web browser? (a) opens web pages for us (b) saves our .html files (c) shows line numbers (d) colours code to help us
  22. 22.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) body (c) Easy snacks (d) We won by 5 runs.
  23. 23.True or false: a web server stores a website’s files. (a) False (b) True
  24. 24.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Sky is blue<br>Kites fly high<br>Rivers flow</p>
  25. 25.Which of these goes in the body? (a) <title> (b) <style> (c) <meta charset="utf-8"> (d) <img>
  26. 26.🌐 Which one is where we type code? (a) a web server (b) a web browser (c) a code editor
  27. 27.🔍 One closing tag is missing. Which one?
    <strong>Good morning!
    <b>The red kite</b>
    <h1>My pets</h1>
    (a) </h1> (b) </strong> (c) </b> (d) </p>
  28. 28.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Easy snacks (b) Try this poha. (c) body (d) Space Facts
  29. 29.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h2> or <h4>? (a) <h6> (b) <h1> (c) <h2> (d) <h4>
  30. 30.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>My best friend</p>
    <p>My pets</p>
    (a) My pets (b) My best friend (c) I love mangoes.
  31. 31.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Orange</li>
    </ul>
    (a) numbers (b) bullets
  32. 32.True or false: in <img>, alt names the picture file. (a) False (b) True
  33. 33.🔍 One closing tag is missing. Which one?
    <b>The red kite
    <h3>Rain today</h3>
    <h2>I love mangoes.</h2>
    (a) </b> (b) </h3> (c) </h2> (d) </small>
  34. 34.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
  35. 35.🔢 In a basic web page file, which comes LAST? (a) </html> (b) </head> (c) <html> (d) <!DOCTYPE html>
  36. 36.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ul>
  37. 37.True or false: <table> goes in the body. (a) True (b) False
  38. 38.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
  39. 39.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="200">
    (a) width (b) The full moon (c) Our school bus (d) moon.png
  40. 40.Which of these has a closing tag? (a) <br> (b) <meta> (c) <b> (d) <img>

Answer key

  1. <h1>
  2. <a>
  3. True
  4. as one space
  5. map.png
  6. href
  7. alt
  8. in the body
  9. </h1>
  10. <a href="about.html">
  11. about.html
  12. <h5>
  13. 1
  14. 1
  15. <meta charset="utf-8">
  16. 200
  17. No
  18. an opening tag
  19. <
  20. a web server
  21. opens web pages for us
  22. Easy snacks
  23. True
  24. 4
  25. <img>
  26. a code editor
  27. </strong>
  28. Easy snacks
  29. <h6>
  30. I love mangoes.
  31. bullets
  32. False
  33. </b>
  34. Yes
  35. </html>
  36. 6
  37. True
  38. <li>
  39. The full moon
  40. <b>

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