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