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