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

Answer key

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

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