← Images with img, src and alt lesson New set →

HTML Worksheet: Images and Alt Text

HTML and CSS lesson 7: Images with img, src and alt · Set 711 · 40 questions
TalentJR

Code tip (File and words): <img src="file.jpg" alt="what it shows" width="200"> — no closing tag. src = which file to load; alt = words describing it; width / height = size in pixels. If the picture fails, the browser shows the alt text; screen readers read it aloud.

NameDateTime takenScore ___ / 40
  1. 1.True or false: in <img>, height sets how tall it is. (a) True (b) False
  2. 2.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="100">
    (a) Birthday cake (b) width (c) A happy dog (d) cake.jpg
  3. 3.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to colour it (d) to describe the image
  4. 4.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) alt (d) height
  5. 5.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="300">
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="350">
    (a) A happy dog (b) width (c) cake.jpg (d) Birthday cake
  7. 7.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="100">
  8. 8.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="100">
  9. 9.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
  10. 10.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="50">
  11. 11.True or false: in <img>, height tells which image to load. (a) True (b) False
  12. 12.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  13. 13.🖼️ Which attribute of <img> names the picture file? (a) height (b) src (c) width (d) alt
  14. 14.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="300">
    (a) The full moon (b) width (c) moon.png (d) Our school bus
  15. 15.True or false: in <img>, alt is read by screen readers. (a) True (b) False
  16. 16.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="300">
    (a) cake.jpg (b) width (c) Birthday cake (d) A happy dog
  17. 17.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="250">
    (a) Our school bus (b) width (c) bus.jpg (d) An old fort
  18. 18.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
    (a) tiger.jpg (b) map.png (c) A tiger asleep (d) kite.png
  19. 19.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="250">
  20. 20.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="100">
  21. 21.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) src (c) alt (d) width
  22. 22.True or false: in <img>, src tells which image to load. (a) True (b) False
  23. 23.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
  24. 24.True or false: in <img>, width describes the picture. (a) True (b) False
  25. 25.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="100">
    (a) dog.jpg (b) map.png (c) cake.jpg (d) Map of India
  26. 26.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="50">
    (a) Our school bus (b) width (c) moon.png (d) The full moon
  27. 27.True or false: in <img>, src is read by screen readers. (a) False (b) True
  28. 28.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="300">
    (a) A happy dog (b) dog.jpg (c) width (d) The full moon
  29. 29.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="350">
  30. 30.True or false: in <img>, alt describes the picture. (a) False (b) True
  31. 31.True or false: in <img>, height shows if the image fails. (a) False (b) True
  32. 32.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="350">
    (a) map.png (b) kite.png (c) cake.jpg (d) A red kite
  33. 33.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) height (c) src (d) width
  34. 34.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="300">
    (a) Our school bus (b) bus.jpg (c) tiger.jpg (d) fort.jpg
  35. 35.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="250">
    (a) moon.png (b) dog.jpg (c) A happy dog (d) bus.jpg
  36. 36.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) src (c) height (d) alt
  37. 37.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="150">
    (a) width (b) Map of India (c) map.png (d) Birthday cake
  38. 38.True or false: in <img>, height names the picture file. (a) True (b) False
  39. 39.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="350">
    (a) An old fort (b) tiger.jpg (c) kite.png (d) fort.jpg
  40. 40.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">

Answer key

  1. True
  2. Birthday cake
  3. to describe the image
  4. alt
  5. 300
  6. Birthday cake
  7. 100
  8. 100
  9. <img>
  10. 50
  11. False
  12. No
  13. src
  14. The full moon
  15. True
  16. Birthday cake
  17. Our school bus
  18. tiger.jpg
  19. 250
  20. 100
  21. alt
  22. True
  23. 50
  24. False
  25. map.png
  26. The full moon
  27. False
  28. A happy dog
  29. 350
  30. True
  31. False
  32. kite.png
  33. width
  34. bus.jpg
  35. dog.jpg
  36. height
  37. Map of India
  38. False
  39. fort.jpg
  40. 200

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