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