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