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

Answer key

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

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