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

Answer key

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

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