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