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