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

Answer key

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

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