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