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

Answer key

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

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