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