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

Answer key

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

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