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

Answer key

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

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