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