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

Answer key

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

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