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