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