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