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

Answer key

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

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