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