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

Answer key

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

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