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