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