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

Answer key

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

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