← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 446 · 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.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) A happy dog (b) cake.jpg (c) width (d) Birthday cake
  2. 2.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to make it bigger (c) to colour it (d) to describe the image
  3. 3.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="150">
    (a) moon.png (b) Birthday cake (c) cake.jpg (d) dog.jpg
  4. 4.🔗 Where does this link open?
    <a href="quiz.html">School news</a>
    (a) in a new tab (b) in the same tab
  5. 5.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h6> or <h1>? (a) <h1> (b) <h4> (c) <h6> (d) <h5>
  6. 6.🔍 Which line is missing its closing tag?
    line 1: <em>Rain today</em>
    line 2: <h1>Our school trip</h1>
    line 3: <u>My pets
    (a) line 2 (b) line 3 (c) line 1
  7. 7.📋 What number does the browser show next to “Banana”?
    <ol start="8">
      <li>Orange</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Banana</li>
    </ol>
  8. 8.🔗 Where does this link open?
    <a href="art.html" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  9. 9.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
  10. 10.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h3>? (a) <h2> (b) <h6> (c) <h3> (d) <h1>
  11. 11.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Rain today</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Good morning!</p> -->
  12. 12.True or false: a code editor colours code to help us. (a) False (b) True
  13. 13.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high<br>Birds sing</p>
  14. 14.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="400">
    (a) width (b) map.png (c) Map of India (d) Birthday cake
  15. 15.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <body> (b) <!DOCTYPE html>
  16. 16.💬 Does the browser show comments on the page? (a) No (b) Yes
  17. 17.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h2>I love mangoes.</h2>
    <p>I love mangoes.</p>
  18. 18.🌐 Which one is where we type code? (a) a web server (b) a code editor (c) a web browser
  19. 19.True or false: <li> is one item of a list. (a) True (b) False
  20. 20.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="100">
  21. 21.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
  22. 22.🔠 Which tag is the least important heading? (a) <h6> (b) <p> (c) <h3> (d) <h1>
  23. 23.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h4> or <h3>? (a) <h1> (b) <h5> (c) <h4> (d) <h3>
  24. 24.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <a> (d) <p>
  25. 25.🔗 Which words do you click on?
    <a href="quiz.html">Play games</a>
    (a) Play games (b) quiz.html (c) About us (d) href
  26. 26.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Orange</li>
    </ul>
    (a) bullets (b) numbers
  27. 27.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h6>? (a) <h4> (b) <h6> (c) <h3> (d) <h1>
  28. 28.Which of these is true of a web browser? (a) opens web pages for us (b) shows line numbers (c) answers page requests (d) saves our .html files
  29. 29.🌐 Which one hosts websites online? (a) a code editor (b) a web server (c) a web browser
  30. 30.💬 How does an HTML comment end? (a) */ (b) >> (c) --> (d) //
  31. 31.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  32. 32.True or false: <ol> lists steps in order. (a) False (b) True
  33. 33.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  34. 34.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the doctype (d) the title
  35. 35.📄 Can HTML on its own make headings? (a) Yes (b) No
  36. 36.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>The red kite</p>
    <!-- <p>Good morning!</p> -->
  37. 37.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) Contact us (b) href (c) games.html (d) Visit the site
  38. 38.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Banana</li>
    </ul>
    (a) numbers (b) bullets
  39. 39.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h4> or <h6>? (a) <h5> (b) <h1> (c) <h6> (d) <h4>
  40. 40.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) src (d) alt

Answer key

  1. Birthday cake
  2. to describe the image
  3. cake.jpg
  4. in the same tab
  5. <h6>
  6. line 3
  7. 12
  8. in a new tab
  9. 4
  10. <h1>
  11. 1
  12. True
  13. 3
  14. Map of India
  15. <!DOCTYPE html>
  16. No
  17. 2
  18. a code editor
  19. True
  20. 100
  21. <ol>
  22. <h6>
  23. <h1>
  24. <img>
  25. Play games
  26. bullets
  27. <h6>
  28. opens web pages for us
  29. a web server
  30. -->
  31. Yes
  32. True
  33. an empty tag
  34. the body
  35. Yes
  36. 1
  37. Contact us
  38. bullets
  39. <h1>
  40. src

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