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

Answer key

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

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