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