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

Answer key

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

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