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

Answer key

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

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