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

Answer key

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

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