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

Answer key

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

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