← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 284 · 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.🔗 Which words do you click on?
    <a href="art.html">About us</a>
    (a) About us (b) Contact us (c) href (d) art.html
  2. 2.True or false: in <img>, src shows if the image fails. (a) False (b) True
  3. 3.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    <p>Rain today</p>
    (a) Rain today (b) Hello, world! (c) Fun facts (d) I love mangoes.
  4. 4.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Our school trip</p>
    <p>My best friend</p>
    (a) Our school trip (b) Hello, world! (c) My best friend
  5. 5.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  6. 6.🔍 Which is the odd one out? (a) stores a website’s files (b) hosts websites online (c) answers page requests (d) shows line numbers
  7. 7.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <ul> (c) <meta charset="utf-8"> (d) <style>
  8. 8.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to add colour (d) to show pictures
  9. 9.True or false: HTML on its own cannot show paragraphs. (a) False (b) True
  10. 10.📋 What number does the browser show next to “Banana”?
    <ol start="4">
      <li>Jamun</li>
      <li>Banana</li>
      <li>Orange</li>
    </ol>
  11. 11.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) { (d) <
  12. 12.True or false: a web server sends pages over the net. (a) False (b) True
  13. 13.🔤 In “HTML”, what do the letters HT stand for? (a) HyperText (b) Hot Tags (c) High Tech (d) Home Text
  14. 14.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) width (c) alt (d) src
  15. 15.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="250">
    (a) map.png (b) Map of India (c) cake.jpg (d) dog.jpg
  16. 16.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
  17. 17.🔤 In “HTML”, what does the L stand for? (a) Link (b) Language (c) Line (d) Laptop
  18. 18.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>Rain today</p> -->
  19. 19.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Mango</li>
      <li>Grapes</li>
    </ol>
  20. 20.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  21. 21.🔍 One closing tag is missing. Which one?
    <i>Cricket is fun.</i>
    <h3>Fun facts
    <b>Good morning!</b>
    (a) </h3> (b) </h1> (c) </i> (d) </b>
  22. 22.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ul>
  23. 23.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  24. 24.🏷️ Which is the closing tag for <strong>? (a) </strong> (b) <strong> (c) <strong/> (d) <\strong>
  25. 25.True or false: <meta> is an empty tag. (a) True (b) False
  26. 26.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h6> or <h4>? (a) <h4> (b) <h6> (c) <h1> (d) <h2>
  27. 27.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h1> (d) <h6>
  28. 28.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  29. 29.Which of these is an empty tag? (a) <h1> (b) <b> (c) <hr> (d) <li>
  30. 30.True or false: <li> goes inside ul or ol. (a) True (b) False
  31. 31.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <hr> (d) <br>
  32. 32.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  33. 33.🔗 Which words do you click on?
    <a href="contact.html">Contact us</a>
    (a) contact.html (b) href (c) Contact us (d) Visit the site
  34. 34.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  35. 35.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  36. 36.Which of these has a closing tag? (a) <meta> (b) <li> (c) <img> (d) <hr>
  37. 37.True or false: in <img>, alt describes the picture. (a) True (b) False
  38. 38.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
  39. 39.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h1> or <h2>? (a) <h2> (b) <h3> (c) <h1> (d) <h6>
  40. 40.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) src (d) alt

Answer key

  1. About us
  2. False
  3. Fun facts
  4. Hello, world!
  5. No
  6. shows line numbers
  7. <ul>
  8. to leave notes
  9. False
  10. 5
  11. <
  12. True
  13. HyperText
  14. width
  15. map.png
  16. 6
  17. Language
  18. 3
  19. 3
  20. in the body
  21. </h3>
  22. 3
  23. in the head
  24. </strong>
  25. True
  26. <h6>
  27. <h6>
  28. an empty tag
  29. <hr>
  30. True
  31. <ol>
  32. has a closing tag
  33. Contact us
  34. No
  35. in the body
  36. <li>
  37. True
  38. <!DOCTYPE html>
  39. <h1>
  40. src

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