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

Answer key

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

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