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