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

Answer key

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

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