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

Answer key

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

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