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

Answer key

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

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