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

Answer key

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

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