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

Answer key

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

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