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

Answer key

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

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