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

Answer key

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

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