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