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

Answer key

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

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