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