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

Answer key

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

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