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.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>My best friend</p> -->
<p>Our school trip</p>
<!-- <p>Rain today</p> --> - 2.📝 What does <p> make? (a) a paragraph (b) a link (c) a table (d) a picture
- 3.🔍 Which is the odd one out? (a) hosts websites online (b) is where we type code (c) stores a website’s files (d) answers page requests
- 4.True or false: in <img>, alt shows if the image fails. (a) False (b) True
- 5.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h4> or <h3>? (a) <h4> (b) <h5> (c) <h2> (d) <h3>
- 6.🌐 Which one shows line numbers? (a) a web server (b) a code editor (c) a web browser
- 7.True or false: <p> has a closing tag. (a) True (b) False
- 8.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 9.🔢 In a basic web page file, which comes first: “</head>” or “</body>”? (a) </body> (b) </head>
-
10.🔗 Which words do you click on?
<a href="news.html">Art corner</a> (a) news.html (b) School news (c) href (d) Art corner -
11.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>My pets</p>
<p>I love mangoes.</p>
<p>Hello, world!</p> -
12.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>Rain today</p> -->
<p>Fun facts</p> -
13.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>Our school trip</p>
<p>Fun facts</p>
<!-- <p>I love mangoes.</p> --> (a) Our school trip (b) Fun facts (c) I love mangoes. (d) Rain today - 14.Which of these is true of a web browser? (a) hosts websites online (b) saves our .html files (c) is where we type code (d) shows pages from the web
- 15.📛 In <a href="x.html">, what is href? (a) an attribute (b) an element name (c) a comment (d) a closing tag
-
16.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Stars shine<br>Roses are red</p> - 17.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 18.True or false: <ol> shows bullet points. (a) True (b) False
- 19.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
- 20.💬 How does an HTML comment start? (a) // (b) # (c) <!-- (d) /*
- 21.🌐 Which one hosts websites online? (a) a web browser (b) a code editor (c) a web server
- 22.True or false: <li> goes inside ul or ol. (a) True (b) False
-
23.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h2>My best friend</h2>
<h2>My best friend</h2>
<h2>I love mangoes.</h2> - 24.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 25.True or false: in <img>, src sets how tall it is. (a) False (b) True
- 26.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <h1> (c) <a> (d) <p>
-
27.🔍 One closing tag is missing. Which one?
<h1>My best friend
<h2>Our school trip</h2>
<u>I love mangoes.</u> (a) </strong> (b) </h2> (c) </u> (d) </h1> - 28.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
29.🔗 Where does this link open?
<a href="games.html">Play games</a> (a) in a new tab (b) in the same tab - 30.True or false: <li> is an empty tag. (a) True (b) False
- 31.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h1> or <h5>? (a) <h5> (b) <h1> (c) <h3> (d) <h2>
-
32.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue<br>Rivers flow<br>Stars shine<br>Birds sing</p> - 33.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 34.Which of these goes in the body? (a) <ul> (b) <style> (c) <meta charset="utf-8"> (d) <title>
-
35.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Jamun</li>
<li>Orange</li>
</ul> (a) bullets (b) numbers - 36.True or false: a code editor is where we type code. (a) True (b) False
-
37.🔗 Where does this link open?
<a href="games.html">Visit the site</a> (a) in a new tab (b) in the same tab - 38.🌐 Which one turns HTML into a page? (a) a code editor (b) a web server (c) a web browser
- 39.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <h1> (d) <p>
- 40.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h5> or <h2>? (a) <h2> (b) <h4> (c) <h5> (d) <h1>
Answer key
- 1
- a paragraph
- is where we type code
- True
- <h5>
- a code editor
- True
- an empty tag
- </head>
- Art corner
- 1
- 1
- I love mangoes.
- shows pages from the web
- an attribute
- 3
- in the head
- False
- <ul>
- <!--
- a web server
- True
- 4
- an opening tag
- False
- <meta charset="utf-8">
- </h1>
- an opening tag
- in the same tab
- False
- <h1>
- 5
- an opening tag
- <ul>
- bullets
- True
- in the same tab
- a web browser
- <h6>
- <h5>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids