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

Answer key

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

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