← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 545 · 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 attribute of <img> is read by screen readers? (a) height (b) src (c) width (d) alt
  2. 2.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
  3. 3.Which of these is a closing tag? (a) <h1> (b) <b> (c) <body> (d) </b>
  4. 4.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  5. 5.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  6. 6.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="200">
    (a) cake.jpg (b) dog.jpg (c) Map of India (d) map.png
  7. 7.True or false: in <img>, width sets how wide it is. (a) False (b) True
  8. 8.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h1>? (a) <h3> (b) <h2> (c) <h1> (d) <h5>
  9. 9.True or false: in <img>, alt sets how wide it is. (a) True (b) False
  10. 10.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h1>? (a) <h1> (b) <h3> (c) <h6> (d) <h5>
  11. 11.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  12. 12.💬 Which text will NOT show on the page?
    <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!
  13. 13.True or false: in <img>, height is read by screen readers. (a) False (b) True
  14. 14.🖼️ Which attribute of <img> describes the picture? (a) alt (b) width (c) height (d) src
  15. 15.🔗 Which words do you click on?
    <a href="art.html">Play games</a>
    (a) art.html (b) About us (c) href (d) Play games
  16. 16.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
  17. 17.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Fun facts</p>
    <p>I love mangoes.</p>
  18. 18.True or false: a web server stores a website’s files. (a) False (b) True
  19. 19.🖼️ Which tag puts a picture on a page? (a) <img> (b) <p> (c) <pic> (d) <a>
  20. 20.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="250">
    (a) kite.png (b) map.png (c) cake.jpg (d) A red kite
  21. 21.🔍 Which line is missing its closing tag?
    line 1: <b>Cricket is fun.</b>
    line 2: <u>My best friend</u>
    line 3: <i>Good morning!
    (a) line 1 (b) line 3 (c) line 2
  22. 22.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Good morning!</p>
    <p>Fun facts</p>
  23. 23.🔍 One closing tag is missing. Which one?
    <strong>Fun facts
    <em>My pets</em>
    <b>Cricket is fun.</b>
    (a) </em> (b) </b> (c) </h2> (d) </strong>
  24. 24.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to colour it (d) to load it faster
  25. 25.True or false: <ul> is an empty tag. (a) True (b) False
  26. 26.🔗 Which address opens when you click this link?
    <a href="games.html">Contact us</a>
    (a) Contact us (b) contact.html (c) about.html (d) games.html
  27. 27.Which of these is true of a code editor? (a) shows pages from the web (b) is where we type code (c) sends pages over the net (d) opens web pages for us
  28. 28.True or false: a code editor colours code to help us. (a) True (b) False
  29. 29.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  30. 30.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <h2>The red kite</h2>
  31. 31.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h3> or <h1>? (a) <h5> (b) <h3> (c) <h4> (d) <h1>
  32. 32.🔍 Which is the odd one out? (a) answers page requests (b) shows pages from the web (c) has an address bar (d) opens web pages for us
  33. 33.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <p> (d) <h3>
  34. 34.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) height (c) alt (d) width
  35. 35.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="350">
    (a) kite.png (b) An old fort (c) tiger.jpg (d) fort.jpg
  36. 36.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Good morning!</p>
    <p>Hello, world!</p>
    (a) Hello, world! (b) Good morning! (c) My best friend
  37. 37.🔗 Which address opens when you click this link?
    <a href="news.html">Play games</a>
    (a) Play games (b) games.html (c) quiz.html (d) news.html
  38. 38.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h2> or <h6>? (a) <h4> (b) <h3> (c) <h2> (d) <h6>
  39. 39.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 6 (d) 10
  40. 40.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Rain today</p>
    <p>Hello, world!</p>
    (a) Rain today (b) Hello, world! (c) Fun facts

Answer key

  1. alt
  2. <li>
  3. </b>
  4. No
  5. <ul>
  6. map.png
  7. True
  8. <h1>
  9. False
  10. <h1>
  11. No
  12. Our school trip
  13. False
  14. alt
  15. Play games
  16. <ul>
  17. 2
  18. True
  19. <img>
  20. kite.png
  21. line 3
  22. 2
  23. </strong>
  24. to describe the image
  25. False
  26. games.html
  27. is where we type code
  28. True
  29. Yes
  30. 5
  31. <h1>
  32. answers page requests
  33. <h6>
  34. height
  35. fort.jpg
  36. My best friend
  37. news.html
  38. <h2>
  39. 1
  40. Fun facts

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