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

Answer key

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

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