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