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

Answer key

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

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