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