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

Answer key

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

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