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

Answer key

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

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