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

Answer key

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

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