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

Answer key

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

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