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

Answer key

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

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