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

Answer key

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

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