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