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

Answer key

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

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