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