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

Answer key

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

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