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