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

Answer key

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

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