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.📝 What does <hr> draw? (a) a table (b) a line across the page (c) a picture (d) a link
- 2.True or false: HTML on its own cannot add up two numbers. (a) False (b) True
-
3.🔗 Which words do you click on?
<a href="games.html">About us</a> (a) href (b) games.html (c) Contact us (d) About us - 4.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h4>? (a) <h4> (b) <h3> (c) <h2> (d) <h5>
- 5.🌐 Which one turns HTML into a page? (a) a web browser (b) a code editor (c) a web server
- 6.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
- 7.🔍 Which is the odd one out? (a) shows pages from the web (b) hosts websites online (c) turns HTML into a page (d) opens web pages for us
- 8.🧱 HTML gives a web page its ___. (a) speed (b) sound (c) structure (d) colours
- 9.🔠 Which tag is the least important heading? (a) <h3> (b) <h1> (c) <p> (d) <h6>
- 10.📝 What do we need to write HTML? (a) a paintbrush (b) a printer (c) a microphone (d) a plain text editor
- 11.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
- 12.Which of these is an empty tag? (a) <li> (b) <b> (c) <title> (d) <meta>
- 13.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) ( (d) {
- 14.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
-
15.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Roses are red<br>Birds sing<br>Kites fly high</p> -
16.🔠 How many headings are in this code?
<h1>My pets</h1>
<h2>I love mangoes.</h2>
<p>I love mangoes.</p>
<p>My pets</p>
<p>My pets</p> - 17.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h5> or <h4>? (a) <h1> (b) <h4> (c) <h6> (d) <h5>
-
18.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h3>My best friend</h3>
<p>I love mangoes.</p> -
19.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>Our school trip</p> -->
<p>The red kite</p> -
20.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>Fun facts</p> -->
<p>The red kite</p>
<p>Good morning!</p>
<!-- <p>I love mangoes.</p> --> - 21.True or false: in <img>, src sets how wide it is. (a) True (b) False
-
22.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="50"> - 23.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
- 24.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
-
25.🔍 One closing tag is missing. Which one?
<b>Our school trip</b>
<h2>The red kite</h2>
<strong>Good morning! (a) </b> (b) </h2> (c) </u> (d) </strong> -
26.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>My pets</p>
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p> (a) My pets (b) Cricket is fun. (c) My best friend (d) Hello, world! - 27.Which of these has a closing tag? (a) <li> (b) <br> (c) <hr> (d) <meta>
- 28.🔢 In a basic web page file, which comes first: “</head>” or “</body>”? (a) </body> (b) </head>
- 29.True or false: <li> is an empty tag. (a) False (b) True
- 30.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 31.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 32.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 33.True or false: <title> goes in the head. (a) True (b) False
-
34.🔍 One closing tag is missing. Which one?
<h2>Rain today</h2>
<p>Cricket is fun.
<small>Hello, world!</small> (a) </h2> (b) </u> (c) </p> (d) </small> -
35.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>My best friend</p>
<p>I love mangoes.</p> - 36.🔢 In a basic web page file, which comes first: “<body>” or “<html>”? (a) <body> (b) <html>
-
37.🔍 Which line is missing its closing tag?
line 1: <small>Hello, world!
line 2: <u>I love mangoes.</u>
line 3: <h2>My pets</h2> (a) line 2 (b) line 3 (c) line 1 - 38.💬 Does the browser show comments on the page? (a) No (b) Yes
- 39.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h1> or <h6>? (a) <h2> (b) <h6> (c) <h3> (d) <h1>
- 40.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h1>? (a) <h1> (b) <h6> (c) <h3> (d) <h4>
Answer key
- a line across the page
- True
- About us
- <h2>
- a web browser
- -->
- hosts websites online
- structure
- <h6>
- a plain text editor
- in the head
- <meta>
- <
- True
- 4
- 2
- <h6>
- 2
- 1
- 2
- False
- 50
- 6
- opens it in a new tab
- </strong>
- Hello, world!
- <li>
- </head>
- False
- a closing tag
- an empty tag
- Yes
- True
- </p>
- 1
- <html>
- line 1
- No
- <h6>
- <h6>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids