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

Answer key

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

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