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