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