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