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

Answer key

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

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