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