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