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