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

Answer key

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

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