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

Answer key

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

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