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