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