← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 97 · 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.🔗 Where does this link open?
    <a href="https://example.com">Visit the site</a>
    (a) in a new tab (b) in the same tab
  2. 2.True or false: <h1> has a closing tag. (a) True (b) False
  3. 3.📄 Where does the text of <title> appear? (a) in a big heading (b) at the bottom (c) on the browser tab (d) nowhere
  4. 4.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Roses are red<br>Sky is blue<br>Stars shine</p>
  5. 5.True or false: <a> goes in the head. (a) False (b) True
  6. 6.🔗 Which address opens when you click this link?
    <a href="games.html">Maths fun</a>
    (a) about.html (b) Maths fun (c) games.html (d) contact.html
  7. 7.🔍 Which line is missing its closing tag?
    line 1: <h2>Rain today
    line 2: <i>Hello, world!</i>
    line 3: <small>Our school trip</small>
    (a) line 1 (b) line 3 (c) line 2
  8. 8.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */
  9. 9.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h1> or <h2>? (a) <h1> (b) <h3> (c) <h2> (d) <h4>
  10. 10.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>The red kite</p> -->
  11. 11.Which of these has a closing tag? (a) <ul> (b) <br> (c) <meta> (d) <hr>
  12. 12.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  13. 13.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>The red kite</h2>
    <h2>The red kite</h2>
    <p>Rain today</p>
  14. 14.🔠 Which tag is the least important heading? (a) <h6> (b) <h3> (c) <p> (d) <h1>
  15. 15.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>Our school trip</h2>
    <p>Fun facts</p>
    <p>My pets</p>
    <h2>I love mangoes.</h2>
    <h2>Good morning!</h2>
  16. 16.Which of these is an empty tag? (a) <ul> (b) <meta> (c) <title> (d) <li>
  17. 17.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) index.html (b) Planets (c) Class 7 Blog (d) I like to read.
  18. 18.True or false: <hr> is an empty tag. (a) False (b) True
  19. 19.True or false: in <img>, src names the picture file. (a) True (b) False
  20. 20.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) index.html (b) Try this poha. (c) Match report (d) Cricket Club
  21. 21.🖼️ Which attribute of <img> names the picture file? (a) src (b) height (c) width (d) alt
  22. 22.True or false: in <img>, alt describes the picture. (a) True (b) False
  23. 23.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h3> or <h2>? (a) <h5> (b) <h6> (c) <h2> (d) <h3>
  24. 24.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) alt (c) src (d) width
  25. 25.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <br> (d) <ul>
  26. 26.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  27. 27.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h4>Hello, world!</h4>
    <p>Good morning!</p>
    <h2>Good morning!</h2>
  28. 28.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="200">
    (a) dog.jpg (b) cake.jpg (c) Map of India (d) map.png
  29. 29.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>My pets</p>
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
  30. 30.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="400">
    (a) width (b) Birthday cake (c) cake.jpg (d) A happy dog
  31. 31.True or false: HTML on its own can pick a random number. (a) True (b) False
  32. 32.💬 How does an HTML comment start? (a) # (b) // (c) /* (d) <!--
  33. 33.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="350">
    (a) Our school bus (b) tiger.jpg (c) bus.jpg (d) fort.jpg
  34. 34.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="250">
    (a) width (b) bus.jpg (c) Our school bus (d) An old fort
  35. 35.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  36. 36.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="300">
    (a) cake.jpg (b) width (c) A happy dog (d) Birthday cake
  37. 37.True or false: <ul> is an unordered list. (a) False (b) True
  38. 38.True or false: <img> goes in the head. (a) False (b) True
  39. 39.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 6 (d) 10
  40. 40.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h4>? (a) <h4> (b) <h2> (c) <h6> (d) <h1>

Answer key

  1. in the same tab
  2. True
  3. on the browser tab
  4. 4
  5. False
  6. games.html
  7. line 1
  8. -->
  9. <h4>
  10. 1
  11. <ul>
  12. an opening tag
  13. 2
  14. <h6>
  15. 3
  16. <meta>
  17. Class 7 Blog
  18. True
  19. True
  20. Cricket Club
  21. src
  22. True
  23. <h6>
  24. width
  25. <ul>
  26. an empty tag
  27. 3
  28. map.png
  29. 4
  30. Birthday cake
  31. False
  32. <!--
  33. bus.jpg
  34. Our school bus
  35. has a closing tag
  36. Birthday cake
  37. True
  38. False
  39. 1
  40. <h1>

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