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

Answer key

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

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