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

Answer key

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

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