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