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>My pets</p> -->
<p>The red kite</p>
<!-- <p>My best friend</p> -->
<p>Our school trip</p>
<p>Fun facts</p> - 2.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
- 3.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to leave notes (d) to make links
-
4.🔍 One closing tag is missing. Which one?
<h2>Fun facts
<i>My pets</i>
<h3>Good morning!</h3> (a) </p> (b) </h3> (c) </h2> (d) </i> - 5.Which of these is an opening tag? (a) </title> (b) </p> (c) <h1> (d) </li>
-
6.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p>
<!-- <p>My pets</p> --> - 7.🖼️ Which attribute of <img> tells which image to load? (a) width (b) alt (c) height (d) src
- 8.🏷️ Which is the closing tag for <i>? (a) <i/> (b) </i> (c) <\i> (d) <i>
-
9.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>The red kite</p>
<!-- <p>I love mangoes.</p> --> (a) Our school trip (b) The red kite (c) I love mangoes. -
10.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Rain today</p>
<h4>Our school trip</h4>
<p>I love mangoes.</p> - 11.📝 What does <hr> draw? (a) a line across the page (b) a table (c) a link (d) a picture
- 12.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
-
13.🔗 Where does this link open?
<a href="maths.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab - 14.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h6> (d) <h1>
- 15.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h5> or <h4>? (a) <h3> (b) <h4> (c) <h6> (d) <h5>
-
16.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Orange</li>
<li>Mango</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Banana</li>
</ul> - 17.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) editor (c) attribute (d) address
-
18.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine<br>Sky is blue</p> - 19.🏷️ Which is the closing tag for <em>? (a) <em> (b) </em> (c) <\em> (d) <em/>
- 20.True or false: <ol> shows bullet points. (a) False (b) True
- 21.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a new line (c) as a dot (d) as 5 spaces
-
22.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h2>Hello, world!</h2>
<p>Fun facts</p>
<h2>Good morning!</h2>
<p>My best friend</p> - 23.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
-
24.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Good morning!</p>
<!-- <p>Hello, world!</p> -->
<p>My pets</p> - 25.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <h1> (d) <br>
- 26.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h6>? (a) <h6> (b) <h3> (c) <h4> (d) <h1>
- 27.True or false: a web browser turns HTML into a page. (a) True (b) False
- 28.Which of these is true of a web browser? (a) hosts websites online (b) stores a website’s files (c) turns HTML into a page (d) shows line numbers
- 29.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
-
30.🔗 Where does this link open?
<a href="https://example.com" target="_blank">About us</a> (a) in a new tab (b) in the same tab - 31.Which of these is true of a web browser? (a) opens web pages for us (b) is where we type code (c) hosts websites online (d) saves our .html files
- 32.True or false: <b> is an empty tag. (a) True (b) False
- 33.True or false: a code editor is where we type code. (a) False (b) True
- 34.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
- 35.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) id (d) src
- 36.Which of these goes in the head? (a) <h1> (b) <a> (c) <p> (d) <title>
- 37.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 6 (d) 4
- 38.True or false: <ul> goes inside ul or ol. (a) True (b) False
- 39.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
40.🔗 Which address opens when you click this link?
<a href="https://example.com">Play games</a> (a) Play games (b) maths.html (c) https://example.com (d) art.html
Answer key
- 3
- <ol>
- to leave notes
- </h2>
- <h1>
- 1
- src
- </i>
- I love mangoes.
- 2
- a line across the page
- a code editor
- in a new tab
- <h6>
- <h6>
- 6
- element
- 3
- </em>
- False
- as one space
- 3
- <a href="about.html">
- 3
- <h1>
- <h6>
- True
- turns HTML into a page
- opens it in a new tab
- in a new tab
- opens web pages for us
- False
- True
- <ul>
- href
- <title>
- 6
- False
- No
- https://example.com
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids