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

Answer key

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

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