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

Answer key

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

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