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