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