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