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

Answer key

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

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