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