← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 760 · 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.True or false: <meta> is an empty tag. (a) True (b) False
  2. 2.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <\h2> (c) </h2> (d) <h2/>
  3. 3.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Mango</li>
    </ul>
    (a) numbers (b) bullets
  4. 4.True or false: HTML on its own can make tables. (a) True (b) False
  5. 5.True or false: HTML on its own cannot make tables. (a) False (b) True
  6. 6.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  7. 7.True or false: in <img>, src sets how wide it is. (a) False (b) True
  8. 8.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Guava</li>
    </ul>
    (a) bullets (b) numbers
  9. 9.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a hash # (d) a slash /
  10. 10.True or false: in <img>, height is read by screen readers. (a) True (b) False
  11. 11.True or false: <ul> is an empty tag. (a) True (b) False
  12. 12.Which of these is true of a web browser? (a) shows line numbers (b) opens web pages for us (c) is where we type code (d) colours code to help us
  13. 13.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="250">
  14. 14.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>My best friend</p>
    <p>Fun facts</p>
    <h3>My best friend</h3>
    <p>Good morning!</p>
  15. 15.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h1> or <h6>? (a) <h6> (b) <h3> (c) <h1> (d) <h5>
  16. 16.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>I love mangoes.</h2>
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <h2>Our school trip</h2>
  17. 17.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Line (c) Link (d) Language
  18. 18.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Banana</li>
    </ol>
  19. 19.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) <head> (c) <!DOCTYPE html> (d) <html>
  20. 20.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
  21. 21.📋 What number does the browser show next to “Jamun”?
    <ol start="2">
      <li>Papaya</li>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ol>
  22. 22.True or false: in <img>, height shows if the image fails. (a) True (b) False
  23. 23.🔗 Which address opens when you click this link?
    <a href="art.html">Take the quiz</a>
    (a) news.html (b) Take the quiz (c) art.html (d) quiz.html
  24. 24.🌐 Which one shows line numbers? (a) a web server (b) a web browser (c) a code editor
  25. 25.🔗 Which address opens when you click this link?
    <a href="contact.html">About us</a>
    (a) maths.html (b) About us (c) contact.html (d) https://example.com
  26. 26.📝 What do we need to write HTML? (a) a printer (b) a microphone (c) a plain text editor (d) a paintbrush
  27. 27.True or false: <title> is an empty tag. (a) False (b) True
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>Rain today</p> -->
    <!-- <p>My best friend</p> -->
    <p>Fun facts</p>
    <p>Hello, world!</p>
  29. 29.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  30. 30.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  31. 31.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) A happy dog (b) bus.jpg (c) moon.png (d) dog.jpg
  32. 32.🖼️ Which attribute of <img> describes the picture? (a) src (b) height (c) width (d) alt
  33. 33.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) width (d) src
  34. 34.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  35. 35.True or false: <ul> is one item of a list. (a) True (b) False
  36. 36.True or false: <meta> has a closing tag. (a) True (b) False
  37. 37.🔍 Which is the odd one out? (a) colours code to help us (b) hosts websites online (c) sends pages over the net (d) stores a website’s files
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <p>Cricket is fun.
    line 2: <small>The red kite</small>
    line 3: <i>My best friend</i>
    (a) line 3 (b) line 2 (c) line 1
  39. 39.Which of these is true of a code editor? (a) stores a website’s files (b) opens web pages for us (c) is where we type code (d) answers page requests
  40. 40.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>The red kite</p>
    <h3>Our school trip</h3>
    <h2>Hello, world!</h2>

Answer key

  1. True
  2. </h2>
  3. bullets
  4. True
  5. False
  6. in the body
  7. False
  8. bullets
  9. a slash /
  10. False
  11. False
  12. opens web pages for us
  13. 250
  14. 2
  15. <h6>
  16. 3
  17. Language
  18. 2
  19. <!DOCTYPE html>
  20. a web server
  21. 4
  22. False
  23. art.html
  24. a code editor
  25. contact.html
  26. a plain text editor
  27. False
  28. 2
  29. an empty tag
  30. a closing tag
  31. dog.jpg
  32. alt
  33. src
  34. has a closing tag
  35. False
  36. False
  37. colours code to help us
  38. line 1
  39. is where we type code
  40. 3

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