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

Answer key

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

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