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