← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 635 · 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.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h4>I love mangoes.</h4>
    <h3>My pets</h3>
    <h2>Hello, world!</h2>
    <p>I love mangoes.</p>
  2. 2.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
  3. 3.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
  4. 4.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  5. 5.💬 How does an HTML comment start? (a) // (b) /* (c) <!-- (d) #
  6. 6.📋 Which tag goes around each item of a list? (a) <li> (b) <ul> (c) <p> (d) <ol>
  7. 7.📄 Can HTML on its own make headings? (a) Yes (b) No
  8. 8.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h2> or <h1>? (a) <h6> (b) <h5> (c) <h2> (d) <h1>
  9. 9.True or false: <img> has a closing tag. (a) False (b) True
  10. 10.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">School news</a>
    (a) in a new tab (b) in the same tab
  11. 11.🔍 One closing tag is missing. Which one?
    <strong>Hello, world!</strong>
    <small>My best friend</small>
    <h1>Good morning!
    (a) </small> (b) </i> (c) </strong> (d) </h1>
  12. 12.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 10 (d) 6
  13. 13.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Modern (c) Mouse (d) Machine
  14. 14.True or false: a web browser shows line numbers. (a) False (b) True
  15. 15.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  16. 16.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  17. 17.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) width (c) alt (d) src
  18. 18.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) at the bottom (d) in a big heading
  19. 19.🏷️ Which is the closing tag for <i>? (a) <i> (b) </i> (c) <i/> (d) <\i>
  20. 20.True or false: <hr> has a closing tag. (a) False (b) True
  21. 21.True or false: a web browser sends pages over the net. (a) False (b) True
  22. 22.True or false: <ol> lists steps in order. (a) True (b) False
  23. 23.📄 Can HTML on its own pick a random number? (a) Yes (b) No
  24. 24.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  25. 25.True or false: <meta> is an empty tag. (a) True (b) False
  26. 26.📋 What number does the browser show next to “Grapes”?
    <ol start="7">
      <li>Litchi</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  27. 27.🔍 One closing tag is missing. Which one?
    <h1>Fun facts</h1>
    <h2>I love mangoes.</h2>
    <h3>Hello, world!
    (a) </h1> (b) </h3> (c) </strong> (d) </h2>
  28. 28.🏷️ Which is the closing tag for <u>? (a) <u> (b) <\u> (c) <u/> (d) </u>
  29. 29.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>Good morning!</h2>
    <p>Fun facts</p>
    <h2>My best friend</h2>
    <p>My best friend</p>
  30. 30.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="400">
    (a) width (b) A happy dog (c) dog.jpg (d) The full moon
  32. 32.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Good morning!</p> -->
  33. 33.Which of these has a closing tag? (a) <br> (b) <input> (c) <ul> (d) <hr>
  34. 34.🔤 In “HTML”, what does the L stand for? (a) Link (b) Language (c) Laptop (d) Line
  35. 35.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
  36. 36.🔍 Which line is missing its closing tag?
    line 1: <i>My pets</i>
    line 2: <strong>I love mangoes.
    line 3: <h1>The red kite</h1>
    (a) line 1 (b) line 3 (c) line 2
  37. 37.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) tiger.jpg (b) A red kite (c) width (d) A tiger asleep
  38. 38.True or false: <ul> is an ordered list. (a) False (b) True
  39. 39.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</html>”? (a) </html> (b) <!DOCTYPE html>
  40. 40.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="350">
    (a) width (b) Our school bus (c) moon.png (d) The full moon

Answer key

  1. 4
  2. 2
  3. <a>
  4. No
  5. <!--
  6. <li>
  7. Yes
  8. <h1>
  9. False
  10. in a new tab
  11. </h1>
  12. 6
  13. Markup
  14. False
  15. an empty tag
  16. No
  17. alt
  18. on the browser tab
  19. </i>
  20. False
  21. False
  22. True
  23. No
  24. in the body
  25. True
  26. 11
  27. </h3>
  28. </u>
  29. 3
  30. an empty tag
  31. A happy dog
  32. 2
  33. <ul>
  34. Language
  35. False
  36. line 2
  37. A tiger asleep
  38. False
  39. <!DOCTYPE html>
  40. The full moon

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