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