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