HTML Worksheet: Practice Test
Code tip (Read the code like a browser): Find the topic of the question: tags, headings, lists, links, images, structure or comments. Read the code line by line, the way a browser would. Count carefully: tags opened and closed, items, lines, paragraphs.
NameDateTime takenScore ___ / 40
- 1.True or false: HTML on its own can pick a random number. (a) False (b) True
-
2.🔍 Which line is missing its closing tag?
line 1: <i>I love mangoes.
line 2: <h1>My best friend</h1>
line 3: <u>Our school trip</u> (a) line 1 (b) line 2 (c) line 3 - 3.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
- 4.True or false: <li> lists things in any order. (a) False (b) True
- 5.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an element name (d) an attribute
- 6.🌐 Which one answers page requests? (a) a web browser (b) a web server (c) a code editor
-
7.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) width (b) A red kite (c) A tiger asleep (d) tiger.jpg - 8.🖼️ Which attribute of <img> names the picture file? (a) height (b) src (c) alt (d) width
-
9.💬 How many paragraphs show on the page?
<p>The red kite</p>
<p>Our school trip</p>
<!-- <p>I love mangoes.</p> --> -
10.🔗 Which words do you click on?
<a href="games.html">Art corner</a> (a) School news (b) href (c) Art corner (d) games.html -
11.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>My pets</p> -->
<p>Cricket is fun.</p> - 12.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <p> (d) <li>
- 13.🔍 Which is the odd one out? (a) stores a website’s files (b) sends pages over the net (c) answers page requests (d) shows pages from the web
-
14.🔗 Which words do you click on?
<a href="games.html">Take the quiz</a> (a) Take the quiz (b) href (c) Play games (d) games.html -
15.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Our school trip</p>
<p>The red kite</p> - 16.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
- 17.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 18.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <br> (c) <hr> (d) <ul>
-
19.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Sky is blue</p> - 20.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a href="about.html">
-
21.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="400"> (a) Birthday cake (b) width (c) map.png (d) Map of India -
22.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="300"> (a) cake.jpg (b) A red kite (c) kite.png (d) map.png - 23.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
24.🔗 Where does this link open?
<a href="about.html" target="_blank">School news</a> (a) in a new tab (b) in the same tab - 25.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 26.🖼️ Does <img> need a closing tag? (a) No (b) Yes
-
27.🖼️ 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 - 28.💬 Does the browser show comments on the page? (a) No (b) Yes
- 29.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <p> (d) <h6>
- 30.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
- 31.Which of these is a closing tag? (a) <h1> (b) <b> (c) <body> (d) </li>
- 32.Which of these is an empty tag? (a) <h1> (b) <p> (c) <title> (d) <hr>
- 33.Which of these is true of a code editor? (a) sends pages over the net (b) stores a website’s files (c) has an address bar (d) saves our .html files
- 34.True or false: in <img>, alt describes the picture. (a) False (b) True
-
35.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>Hello, world!</p> -->
<p>The red kite</p>
<p>My best friend</p> (a) Rain today (b) My best friend (c) The red kite (d) Hello, world! -
36.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="100"> (a) kite.png (b) Map of India (c) width (d) A red kite - 37.📝 What does <p> make? (a) a table (b) a paragraph (c) a picture (d) a link
-
38.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<!-- <p>Hello, world!</p> -->
<p>Good morning!</p> - 39.📄 Can HTML on its own make headings? (a) No (b) Yes
- 40.💬 How does an HTML comment end? (a) // (b) */ (c) >> (d) -->
Answer key
- False
- line 1
- 6
- False
- an attribute
- a web server
- A tiger asleep
- src
- 2
- Art corner
- 1
- <li>
- shows pages from the web
- Take the quiz
- 3
- <a>
- an empty tag
- <ol>
- 2
- <a href="about.html">
- Map of India
- kite.png
- an opening tag
- in a new tab
- a closing tag
- No
- A happy dog
- No
- <h1>
- <ul>
- </li>
- <hr>
- saves our .html files
- True
- Hello, world!
- A red kite
- a paragraph
- 1
- Yes
- -->
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids