← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 575 · 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 text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>My best friend</p>
    (a) My best friend (b) My pets (c) I love mangoes. (d) Hello, world!
  2. 2.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
  3. 3.True or false: <li> is an empty tag. (a) True (b) False
  4. 4.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="400">
    (a) Our school bus (b) An old fort (c) width (d) bus.jpg
  5. 5.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h4> or <h3>? (a) <h5> (b) <h6> (c) <h4> (d) <h3>
  6. 6.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  7. 7.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="50">
    (a) moon.png (b) The full moon (c) fort.jpg (d) bus.jpg
  8. 8.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
    <p>Rain today</p>
    (a) Rain today (b) Hello, world! (c) My best friend
  9. 9.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) The red kite (c) Rain today (d) Cricket is fun.
  10. 10.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="400">
    (a) dog.jpg (b) width (c) A happy dog (d) The full moon
  11. 11.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>The red kite</h2>
    <p>Rain today</p>
    <p>I love mangoes.</p>
  12. 12.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h5> or <h2>? (a) <h4> (b) <h5> (c) <h6> (d) <h2>
  13. 13.True or false: in <img>, width names the picture file. (a) False (b) True
  14. 14.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h2> or <h1>? (a) <h2> (b) <h3> (c) <h6> (d) <h1>
  15. 15.True or false: <h1> has a closing tag. (a) False (b) True
  16. 16.💬 How does an HTML comment start? (a) // (b) /* (c) <!-- (d) #
  17. 17.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <link rel="stylesheet"> (c) <title> (d) <p>
  18. 18.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h4> or <h1>? (a) <h1> (b) <h5> (c) <h2> (d) <h4>
  19. 19.True or false: <li> is an unordered list. (a) True (b) False
  20. 20.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    (a) Cricket is fun. (b) I love mangoes. (c) Good morning!
  21. 21.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h3>My best friend</h3>
    <p>The red kite</p>
  22. 22.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  23. 23.Which of these goes in the head? (a) <h1> (b) <p> (c) <title> (d) <img>
  24. 24.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="300">
  25. 25.🔗 Which words do you click on?
    <a href="quiz.html">Maths fun</a>
    (a) Art corner (b) href (c) Maths fun (d) quiz.html
  26. 26.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Grapes</li>
    </ol>
  27. 27.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="300">
  28. 28.🔢 In a basic web page file, which comes first: “</html>” or “</head>”? (a) </head> (b) </html>
  29. 29.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>The red kite</p>
    <p>I love mangoes.</p>
  30. 30.🔍 One closing tag is missing. Which one?
    <h2>I love mangoes.
    <i>Good morning!</i>
    <b>My best friend</b>
    (a) </b> (b) </h2> (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.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>Cricket is fun.</h2>
    <p>My pets</p>
    <p>My best friend</p>
    <p>My best friend</p>
    <p>My best friend</p>
  33. 33.🔗 Which words do you click on?
    <a href="contact.html">Contact us</a>
    (a) href (b) Visit the site (c) contact.html (d) Contact us
  34. 34.🔗 Where does this link open?
    <a href="maths.html">Play games</a>
    (a) in a new tab (b) in the same tab
  35. 35.🔍 Which line is missing its closing tag?
    line 1: <h2>Our school trip
    line 2: <p>My pets</p>
    line 3: <u>Good morning!</u>
    (a) line 1 (b) line 2 (c) line 3
  36. 36.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) body (c) I like to read. (d) Planets
  37. 37.Which of these goes in the head? (a) <table> (b) <ul> (c) <h1> (d) <style>
  38. 38.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->
  39. 39.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>Good morning!</h2>
    <p>Hello, world!</p>
    <h2>My best friend</h2>
    <h2>My pets</h2>
    <h2>My pets</h2>
  40. 40.🔍 One closing tag is missing. Which one?
    <i>My best friend</i>
    <h1>Rain today
    <strong>Cricket is fun.</strong>
    (a) </h1> (b) </strong> (c) </h2> (d) </i>

Answer key

  1. Hello, world!
  2. a web browser
  3. False
  4. Our school bus
  5. <h3>
  6. an opening tag
  7. moon.png
  8. My best friend
  9. Rain today
  10. A happy dog
  11. 3
  12. <h2>
  13. False
  14. <h1>
  15. True
  16. <!--
  17. <p>
  18. <h1>
  19. False
  20. I love mangoes.
  21. 2
  22. an opening tag
  23. <title>
  24. 300
  25. Maths fun
  26. 2
  27. 300
  28. </head>
  29. 3
  30. </h2>
  31. Map of India
  32. 5
  33. Contact us
  34. in the same tab
  35. line 1
  36. Planets
  37. <style>
  38. 4
  39. 2
  40. </h1>

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