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