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

Answer key

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

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