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

Answer key

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

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