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

Answer key

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

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