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

Answer key

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

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