← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 609 · 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 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
  2. 2.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>My pets</p>
    <h2>Fun facts</h2>
  3. 3.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>My pets</p> -->
  4. 4.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
  5. 5.True or false: <li> is one item of a list. (a) True (b) False
  6. 6.True or false: <ul> lists things in any order. (a) True (b) False
  7. 7.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <p> (d) <ul>
  8. 8.True or false: <br> is an empty tag. (a) True (b) False
  9. 9.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
  10. 10.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  11. 11.Which of these is an opening tag? (a) </body> (b) </b> (c) </h1> (d) <body>
  12. 12.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue<br>Rivers flow<br>Stars shine<br>Roses are red</p>
  13. 13.📄 Where does the text of <title> appear? (a) at the bottom (b) on the browser tab (c) in a big heading (d) nowhere
  14. 14.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <p> (d) <img>
  15. 15.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="250">
  16. 16.True or false: in <img>, src sets how tall it is. (a) False (b) True
  17. 17.True or false: a web server sends pages over the net. (a) True (b) False
  18. 18.🏷️ HTML marks up text using ___. (a) tags (b) wires (c) keys (d) pixels
  19. 19.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Birds sing</p>
  20. 20.True or false: <h1> goes in the body. (a) True (b) False
  21. 21.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  22. 22.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  23. 23.🔍 Which is the odd one out? (a) is where we type code (b) saves our .html files (c) shows line numbers (d) shows pages from the web
  24. 24.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="200">
    (a) Birthday cake (b) map.png (c) width (d) Map of India
  25. 25.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h3>? (a) <h3> (b) <h5> (c) <h6> (d) <h2>
  26. 26.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
  27. 27.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  28. 28.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) Play games (b) games.html (c) href (d) About us
  29. 29.🔗 Where does this link open?
    <a href="games.html">About us</a>
    (a) in a new tab (b) in the same tab
  30. 30.📋 What number does the browser show next to “Jamun”?
    <ol start="4">
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Papaya</li>
    </ol>
  31. 31.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Papaya</li>
    </ul>
  32. 32.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <pic> (d) <p>
  33. 33.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Match report (b) We won by 5 runs. (c) index.html (d) My Hobbies
  34. 34.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to load it faster (d) to colour it
  35. 35.📋 What number does the browser show next to “Banana”?
    <ol start="7">
      <li>Mango</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  36. 36.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="50">
  37. 37.🔢 In a basic web page file, which comes first: “</head>” or “<head>”? (a) <head> (b) </head>
  38. 38.🔍 One closing tag is missing. Which one?
    <h2>Good morning!
    <h1>The red kite</h1>
    <b>My pets</b>
    (a) </b> (b) </h1> (c) </h2> (d) </strong>
  39. 39.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h2> or <h5>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
  40. 40.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No

Answer key

  1. contact.html
  2. 2
  3. 1
  4. opens it in a new tab
  5. True
  6. True
  7. <li>
  8. True
  9. 2
  10. has a closing tag
  11. <body>
  12. 5
  13. on the browser tab
  14. <a>
  15. 250
  16. False
  17. True
  18. tags
  19. 2
  20. True
  21. <ul>
  22. has a closing tag
  23. shows pages from the web
  24. Map of India
  25. <h6>
  26. False
  27. No
  28. Play games
  29. in the same tab
  30. 5
  31. 2
  32. <img>
  33. My Hobbies
  34. to describe the image
  35. 8
  36. 50
  37. <head>
  38. </h2>
  39. <h6>
  40. Yes

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