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