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