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

Answer key

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

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