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

Answer key

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

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