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

Answer key

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

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