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

Answer key

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

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