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

Answer key

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

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