← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 230 · 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: in <img>, alt describes the picture. (a) True (b) False
  2. 2.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h3> or <h5>? (a) <h2> (b) <h5> (c) <h3> (d) <h6>
  3. 3.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  4. 4.🔠 Which tag is the least important heading? (a) <p> (b) <h1> (c) <h3> (d) <h6>
  5. 5.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    <p>Our school trip</p>
    (a) Our school trip (b) I love mangoes. (c) Hello, world! (d) My pets
  6. 6.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <ol> (d) <br>
  7. 7.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  8. 8.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) width (b) A tiger asleep (c) A red kite (d) tiger.jpg
  9. 9.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) opens it in a new tab (d) hides the link
  10. 10.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Banana</li>
    </ul>
    (a) numbers (b) bullets
  11. 11.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>My pets</h2>
    <p>The red kite</p>
  12. 12.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
  13. 13.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
  14. 14.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    <p>Good morning!</p>
    (a) Rain today (b) Good morning! (c) Hello, world!
  15. 15.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h5> or <h4>? (a) <h5> (b) <h2> (c) <h3> (d) <h4>
  16. 16.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Litchi</li>
    </ol>
  17. 17.🔢 In a basic web page file, which comes first: “<head>” or “</html>”? (a) <head> (b) </html>
  18. 18.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) index.html (b) Space Facts (c) Welcome! (d) We won by 5 runs.
  19. 19.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Modern (c) Machine (d) Markup
  20. 20.Which of these is an empty tag? (a) <p> (b) <li> (c) <br> (d) <ul>
  21. 21.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  22. 22.True or false: <style> goes in the body. (a) True (b) False
  23. 23.True or false: <img> goes in the body. (a) True (b) False
  24. 24.📄 Where does the text of <title> appear? (a) at the bottom (b) on the browser tab (c) in a big heading (d) nowhere
  25. 25.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  26. 26.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
  27. 27.Which of these is an opening tag? (a) <p> (b) </b> (c) </title> (d) </h1>
  28. 28.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  29. 29.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) width (c) height (d) alt
  30. 30.🔍 Which line is missing its closing tag?
    line 1: <h3>Cricket is fun.</h3>
    line 2: <p>Good morning!</p>
    line 3: <b>Rain today
    (a) line 1 (b) line 2 (c) line 3
  31. 31.🔠 Are headings shown in bold by default? (a) Yes (b) No
  32. 32.True or false: a code editor is where we type code. (a) True (b) False
  33. 33.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Rain today</p>
    <p>My pets</p>
    <p>I love mangoes.</p>
  34. 34.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Hello, world!</p>
    <h4>My pets</h4>
  35. 35.True or false: in <img>, height sets how tall it is. (a) True (b) False
  36. 36.Which of these is an opening tag? (a) </p> (b) </title> (c) <h1> (d) </b>
  37. 37.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h3> or <h6>? (a) <h4> (b) <h3> (c) <h6> (d) <h2>
  38. 38.🔗 What does HyperText mean? (a) text in colour (b) very big text (c) text with links (d) secret text
  39. 39.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <p> (c) <br> (d) <h6>
  40. 40.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ol>

Answer key

  1. True
  2. <h2>
  3. an opening tag
  4. <h6>
  5. Hello, world!
  6. <ul>
  7. an empty tag
  8. A tiger asleep
  9. opens it in a new tab
  10. bullets
  11. 2
  12. <li>
  13. False
  14. Hello, world!
  15. <h2>
  16. 2
  17. <head>
  18. Space Facts
  19. Markup
  20. <br>
  21. True
  22. False
  23. True
  24. on the browser tab
  25. Yes
  26. 1
  27. <p>
  28. No
  29. width
  30. line 3
  31. Yes
  32. True
  33. 3
  34. 2
  35. True
  36. <h1>
  37. <h2>
  38. text with links
  39. <h1>
  40. 5

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