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

Answer key

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

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