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

Answer key

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

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