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

Answer key

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

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