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