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