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

Answer key

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

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