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.Which of these goes in the head? (a) <link rel="stylesheet"> (b) <p> (c) <img> (d) <h1>
-
2.🔗 Which words do you click on?
<a href="https://example.com">Contact us</a> (a) https://example.com (b) Contact us (c) Visit the site (d) href - 3.📄 Can HTML on its own make links to pages? (a) Yes (b) No
- 4.Which of these is a closing tag? (a) <p> (b) <body> (c) </li> (d) <h1>
-
5.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Orange</li>
<li>Jamun</li>
</ul> - 6.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <p> (d) <img>
- 7.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h3> or <h6>? (a) <h6> (b) <h5> (c) <h2> (d) <h3>
-
8.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Good morning!</p>
<h2>Cricket is fun.</h2> -
9.🔗 Which address opens when you click this link?
<a href="maths.html">Visit the site</a> (a) Visit the site (b) news.html (c) art.html (d) maths.html - 10.Which of these is true of a web browser? (a) is where we type code (b) stores a website’s files (c) has an address bar (d) colours code to help us
-
11.🔍 One closing tag is missing. Which one?
<h1>The red kite
<u>My pets</u>
<i>Good morning!</i> (a) </i> (b) </u> (c) </small> (d) </h1> - 12.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h4> or <h3>? (a) <h5> (b) <h4> (c) <h3> (d) <h6>
- 13.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as one space (d) as a new line
-
14.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>My drawings</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Cricket Club (b) Thanks for visiting. (c) body (d) My drawings - 15.💬 How does an HTML comment start? (a) # (b) /* (c) // (d) <!--
-
16.🔗 Where does this link open?
<a href="maths.html" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab - 17.🔢 In a basic web page file, which comes first: “<head>” or “<html>”? (a) <head> (b) <html>
- 18.🔍 Which is the odd one out? (a) has an address bar (b) stores a website’s files (c) answers page requests (d) hosts websites online
-
19.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>I love mangoes.</p>
<p>Our school trip</p>
<!-- <p>Good morning!</p> -->
<p>Cricket is fun.</p> - 20.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <a href="about.html">
-
21.🔗 Where does this link open?
<a href="games.html">School news</a> (a) in the same tab (b) in a new tab -
22.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>My best friend</p>
<p>My pets</p> (a) My pets (b) Our school trip (c) My best friend -
23.🔗 Which words do you click on?
<a href="https://example.com">Take the quiz</a> (a) Play games (b) href (c) Take the quiz (d) https://example.com - 24.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) height (c) alt (d) width
- 25.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) attribute (c) address (d) element
- 26.🌐 Which one is where we type code? (a) a web server (b) a web browser (c) a code editor
- 27.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a hash # (d) a dot .
- 28.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to show pictures (d) to leave notes
- 29.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <p> (d) <h1>
-
30.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>The red kite</p>
<p>Our school trip</p>
<p>Cricket is fun.</p>
<p>Rain today</p> - 31.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
- 32.🧱 HTML gives a web page its ___. (a) sound (b) speed (c) structure (d) colours
- 33.💬 Does the browser show comments on the page? (a) Yes (b) No
-
34.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Grapes</li>
</ol> (a) bullets (b) numbers - 35.True or false: <ol> is one item of a list. (a) True (b) False
- 36.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
37.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>My best friend</p>
<!-- <p>Rain today</p> -->
<!-- <p>Cricket is fun.</p> --> -
38.📋 What number does the browser show next to “Papaya”?
<ol start="2">
<li>Jamun</li>
<li>Mango</li>
<li>Banana</li>
<li>Papaya</li>
</ol> - 39.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
- 40.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
Answer key
- <link rel="stylesheet">
- Contact us
- Yes
- </li>
- 3
- <a>
- <h2>
- 2
- maths.html
- has an address bar
- </h1>
- <h3>
- as one space
- My drawings
- <!--
- in a new tab
- <html>
- has an address bar
- 4
- <a href="about.html">
- in the same tab
- Our school trip
- Take the quiz
- height
- element
- a code editor
- a slash /
- to leave notes
- <h1>
- 5
- a web browser
- structure
- No
- numbers
- False
- an opening tag
- 1
- 5
- <ol>
- an attribute
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids