← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 497 · 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) Contact us (b) About us (c) art.html (d) href
  2. 2.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
  3. 3.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) src (c) height (d) width
  4. 4.True or false: in <img>, alt sets how wide it is. (a) True (b) False
  5. 5.True or false: HTML on its own cannot pick a random number. (a) False (b) True
  6. 6.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  7. 7.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt
  8. 8.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
  9. 9.🔗 Which address opens when you click this link?
    <a href="contact.html">Art corner</a>
    (a) https://example.com (b) maths.html (c) contact.html (d) Art corner
  10. 10.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  11. 11.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) <body>
  12. 12.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
  13. 13.🖼️ Which attribute of <img> names the picture file? (a) src (b) height (c) width (d) alt
  14. 14.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  15. 15.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Stars shine<br>Rivers flow<br>Birds sing</p>
  16. 16.📋 Which list suits a shopping list in any order? (a) <br> (b) <ul> (c) <hr> (d) <ol>
  17. 17.True or false: <p> goes in the head. (a) True (b) False
  18. 18.🔗 Where does this link open?
    <a href="games.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  19. 19.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <p>Fun facts</p>
    <!-- <p>My best friend</p> -->
    <p>Cricket is fun.</p>
  20. 20.True or false: a web server has an address bar. (a) False (b) True
  21. 21.True or false: a code editor saves our .html files. (a) True (b) False
  22. 22.🔍 One closing tag is missing. Which one?
    <h2>Rain today</h2>
    <u>Fun facts
    <strong>Hello, world!</strong>
    (a) </small> (b) </u> (c) </h2> (d) </strong>
  23. 23.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="100">
    (a) A red kite (b) kite.png (c) map.png (d) cake.jpg
  24. 24.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ul>
  25. 25.True or false: <style> goes in the head. (a) False (b) True
  26. 26.True or false: in <img>, alt describes the picture. (a) False (b) True
  27. 27.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Fun facts</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) The red kite (b) Fun facts (c) Cricket is fun.
  28. 28.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="250">
  29. 29.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  30. 30.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  31. 31.True or false: HTML on its own can make bullet lists. (a) True (b) False
  32. 32.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <ul> (d) <li>
  33. 33.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
    (a) numbers (b) bullets
  34. 34.🔗 Where does this link open?
    <a href="news.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  35. 35.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
  36. 36.True or false: <title> goes in the head. (a) True (b) False
  37. 37.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="250">
    (a) Birthday cake (b) width (c) Map of India (d) map.png
  38. 38.🔍 Which is the odd one out? (a) answers page requests (b) saves our .html files (c) stores a website’s files (d) hosts websites online
  39. 39.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <img> (d) <link>
  40. 40.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) <h1/> (c) <h1> (d) </h1>

Answer key

  1. About us
  2. a web browser
  3. alt
  4. False
  5. True
  6. in the head
  7. href
  8. 1
  9. contact.html
  10. an opening tag
  11. <!DOCTYPE html>
  12. <ol>
  13. src
  14. in the body
  15. 4
  16. <ul>
  17. False
  18. in a new tab
  19. 3
  20. False
  21. True
  22. </u>
  23. kite.png
  24. 5
  25. True
  26. True
  27. Cricket is fun.
  28. 250
  29. an empty tag
  30. an empty tag
  31. True
  32. <li>
  33. numbers
  34. in a new tab
  35. 3
  36. True
  37. Map of India
  38. saves our .html files
  39. <a>
  40. </h1>

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