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