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

Answer key

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

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