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

Answer key

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

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