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

Answer key

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

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