← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 330 · 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.🔍 One closing tag is missing. Which one?
    <small>Fun facts</small>
    <h3>My pets</h3>
    <h1>Good morning!
    (a) </p> (b) </h3> (c) </small> (d) </h1>
  2. 2.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ul> (d) <ol>
  3. 3.🖼️ Which attribute of <img> describes the picture? (a) alt (b) width (c) height (d) src
  4. 4.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h3> or <h6>? (a) <h4> (b) <h6> (c) <h2> (d) <h3>
  5. 5.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Jamun</li>
    </ul>
    (a) bullets (b) numbers
  6. 6.🔢 In a basic web page file, which comes first: “</head>” or “<head>”? (a) </head> (b) <head>
  7. 7.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
  8. 8.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
  9. 9.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) <html> (c) <!DOCTYPE html> (d) </html>
  10. 10.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h3>Hello, world!</h3>
    <h3>Good morning!</h3>
    <h4>Fun facts</h4>
  11. 11.🔍 Which is the odd one out? (a) stores a website’s files (b) shows pages from the web (c) turns HTML into a page (d) opens web pages for us
  12. 12.🔍 One closing tag is missing. Which one?
    <h3>Cricket is fun.</h3>
    <h2>My pets</h2>
    <strong>Fun facts
    (a) </h3> (b) </p> (c) </h2> (d) </strong>
  13. 13.True or false: HTML on its own can count button clicks. (a) False (b) True
  14. 14.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  15. 15.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) in a big heading (d) nowhere
  16. 16.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <h2> (c) <\h2> (d) <h2/>
  17. 17.🔍 One closing tag is missing. Which one?
    <small>The red kite
    <strong>I love mangoes.</strong>
    <h1>Our school trip</h1>
    (a) </small> (b) </em> (c) </h1> (d) </strong>
  18. 18.Which of these goes in the body? (a) <img> (b) <link rel="stylesheet"> (c) <style> (d) <title>
  19. 19.🔗 Where does this link open?
    <a href="https://example.com">Visit the site</a>
    (a) in a new tab (b) in the same tab
  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>Here is my best one.</p>
    </body>
    </html>
    (a) index.html (b) Here is my best one. (c) Match report (d) Cricket Club
  21. 21.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>My pets</h2>
    <h2>Good morning!</h2>
    <h2>Good morning!</h2>
  22. 22.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="400">
    (a) fort.jpg (b) The full moon (c) moon.png (d) bus.jpg
  23. 23.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) starts a new line (d) makes a list
  24. 24.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Grapes</li>
    </ul>
    (a) bullets (b) numbers
  25. 25.🔗 Which address opens when you click this link?
    <a href="news.html">School news</a>
    (a) games.html (b) School news (c) quiz.html (d) news.html
  26. 26.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="400">
  27. 27.True or false: <input> has a closing tag. (a) True (b) False
  28. 28.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  29. 29.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) tiger.jpg (b) A red kite (c) A tiger asleep (d) width
  30. 30.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  31. 31.🔗 Which words do you click on?
    <a href="news.html">Contact us</a>
    (a) news.html (b) Visit the site (c) href (d) Contact us
  32. 32.True or false: HTML on its own cannot make tables. (a) True (b) False
  33. 33.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  34. 34.True or false: <ul> is one item of a list. (a) False (b) True
  35. 35.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
    (a) kite.png (b) tiger.jpg (c) map.png (d) A tiger asleep
  36. 36.🔍 Which line is missing its closing tag?
    line 1: <em>I love mangoes.</em>
    line 2: <i>Cricket is fun.
    line 3: <h1>Hello, world!</h1>
    (a) line 1 (b) line 3 (c) line 2
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    <p>Good morning!</p>
    <p>My best friend</p>
  38. 38.True or false: <ul> goes in the body. (a) True (b) False
  39. 39.📋 What number does the browser show next to “Orange”?
    <ol start="3">
      <li>Mango</li>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Papaya</li>
    </ol>
  40. 40.🔍 Which is the odd one out? (a) stores a website’s files (b) answers page requests (c) saves our .html files (d) hosts websites online

Answer key

  1. </h1>
  2. <li>
  3. alt
  4. <h6>
  5. bullets
  6. <head>
  7. 2
  8. <ol>
  9. <!DOCTYPE html>
  10. 4
  11. stores a website’s files
  12. </strong>
  13. False
  14. has a closing tag
  15. on the browser tab
  16. </h2>
  17. </small>
  18. <img>
  19. in the same tab
  20. Cricket Club
  21. 1
  22. moon.png
  23. starts a new line
  24. bullets
  25. news.html
  26. 400
  27. False
  28. Yes
  29. A tiger asleep
  30. has a closing tag
  31. Contact us
  32. False
  33. Yes
  34. False
  35. tiger.jpg
  36. line 2
  37. 3
  38. True
  39. 5
  40. saves our .html files

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