← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 713 · 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.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  2. 2.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <style> (c) <title> (d) <img>
  3. 3.🔍 One closing tag is missing. Which one?
    <i>My pets</i>
    <u>Good morning!</u>
    <h1>I love mangoes.
    (a) </p> (b) </u> (c) </i> (d) </h1>
  4. 4.True or false: <ul> lists steps in order. (a) False (b) True
  5. 5.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h6>? (a) <h1> (b) <h5> (c) <h2> (d) <h6>
  6. 6.🔍 Which is the odd one out? (a) saves our .html files (b) is where we type code (c) shows pages from the web (d) colours code to help us
  7. 7.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h4>Cricket is fun.</h4>
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    <h4>Our school trip</h4>
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <strong>Our school trip</strong>
    line 2: <u>The red kite
    line 3: <p>I love mangoes.</p>
    (a) line 2 (b) line 1 (c) line 3
  9. 9.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Jamun</li>
    </ul>
    (a) numbers (b) bullets
  10. 10.🖼️ Which attribute of <img> names the picture file? (a) alt (b) height (c) src (d) width
  11. 11.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
  12. 12.Which of these is true of a web server? (a) sends pages over the net (b) turns HTML into a page (c) shows pages from the web (d) has an address bar
  13. 13.True or false: <p> is an empty tag. (a) True (b) False
  14. 14.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  15. 15.Which of these has a closing tag? (a) <input> (b) <h1> (c) <br> (d) <hr>
  16. 16.📋 What number does the browser show next to “Jamun”?
    <ol start="2">
      <li>Mango</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Guava</li>
    </ol>
  17. 17.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="50">
    (a) The full moon (b) Our school bus (c) width (d) moon.png
  18. 18.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  19. 19.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) <strong> (c) <\strong> (d) </strong>
  20. 20.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h3>I love mangoes.</h3>
    <p>The red kite</p>
  21. 21.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h2> or <h6>? (a) <h5> (b) <h3> (c) <h2> (d) <h6>
  22. 22.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <!-- <p>My pets</p> -->
  23. 23.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="250">
    (a) cake.jpg (b) Birthday cake (c) moon.png (d) dog.jpg
  24. 24.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow</p>
  25. 25.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) Planets (c) Here is my best one. (d) index.html
  26. 26.💬 How does an HTML comment end? (a) >> (b) */ (c) --> (d) //
  27. 27.💬 How does an HTML comment start? (a) // (b) /* (c) # (d) <!--
  28. 28.🔗 Which address opens when you click this link?
    <a href="maths.html">Take the quiz</a>
    (a) Take the quiz (b) maths.html (c) art.html (d) news.html
  29. 29.🖼️ 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) An old fort (d) Our school bus
  30. 30.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
    (a) Hello, world! (b) The red kite (c) Fun facts
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) width (b) Birthday cake (c) A happy dog (d) cake.jpg
  32. 32.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Hello, world!</p>
    <h4>Hello, world!</h4>
    <h2>My pets</h2>
  33. 33.True or false: <hr> has a closing tag. (a) True (b) False
  34. 34.Which of these is true of a web server? (a) hosts websites online (b) colours code to help us (c) saves our .html files (d) opens web pages for us
  35. 35.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Good morning!</p> -->
  36. 36.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
  37. 37.True or false: in <img>, width tells which image to load. (a) False (b) True
  38. 38.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) element (d) address
  39. 39.🔗 Where does this link open?
    <a href="news.html" target="_blank">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  40. 40.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>My pets</p> -->
    <!-- <p>I love mangoes.</p> -->

Answer key

  1. has a closing tag
  2. <img>
  3. </h1>
  4. False
  5. <h6>
  6. shows pages from the web
  7. 3
  8. line 2
  9. bullets
  10. src
  11. <ol>
  12. sends pages over the net
  13. False
  14. 6
  15. <h1>
  16. 3
  17. The full moon
  18. Yes
  19. </strong>
  20. 2
  21. <h2>
  22. 2
  23. cake.jpg
  24. 2
  25. Class 7 Blog
  26. -->
  27. <!--
  28. maths.html
  29. Our school bus
  30. Fun facts
  31. Birthday cake
  32. 3
  33. False
  34. hosts websites online
  35. 1
  36. True
  37. False
  38. element
  39. in a new tab
  40. 1

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