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

Answer key

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

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