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