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.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 2.🔢 In a basic web page file, which comes first: “</head>” or “<html>”? (a) </head> (b) <html>
- 3.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <a href="about.html"> (d) <link about.html>
- 4.Which of these is true of a code editor? (a) sends pages over the net (b) colours code to help us (c) turns HTML into a page (d) shows pages from the web
-
5.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Here is my best one.</p>
</body>
</html> (a) All about me (b) Class 7 Blog (c) Here is my best one. (d) body - 6.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h3> or <h6>? (a) <h4> (b) <h3> (c) <h5> (d) <h6>
-
7.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Guava</li>
</ul> (a) bullets (b) numbers - 8.True or false: <li> is an ordered list. (a) False (b) True
-
9.📋 What number does the browser show next to “Orange”?
<ol>
<li>Guava</li>
<li>Orange</li>
<li>Banana</li>
<li>Litchi</li>
</ol> -
10.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="150"> (a) A happy dog (b) width (c) dog.jpg (d) The full moon - 11.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) <h1/> (c) <h1> (d) </h1>
- 12.Which of these is true of a web server? (a) colours code to help us (b) answers page requests (c) shows line numbers (d) has an address bar
- 13.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h5>? (a) <h1> (b) <h5> (c) <h6> (d) <h2>
-
14.🔍 Which line is missing its closing tag?
line 1: <p>Good morning!</p>
line 2: <i>Rain today
line 3: <small>The red kite</small> (a) line 1 (b) line 3 (c) line 2 -
15.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Fun facts</p>
<p>My best friend</p>
<p>I love mangoes.</p> (a) Fun facts (b) My best friend (c) Rain today (d) I love mangoes. -
16.🔗 Which words do you click on?
<a href="about.html">School news</a> (a) href (b) about.html (c) Take the quiz (d) School news - 17.True or false: a web browser has an address bar. (a) False (b) True
- 18.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <html> (d) <!DOCTYPE html>
- 19.Which of these is true of a code editor? (a) sends pages over the net (b) hosts websites online (c) has an address bar (d) is where we type code
- 20.Which of these is true of a web browser? (a) is where we type code (b) opens web pages for us (c) sends pages over the net (d) saves our .html files
-
21.🔗 Which words do you click on?
<a href="about.html">Maths fun</a> (a) Maths fun (b) Art corner (c) href (d) about.html -
22.🔠 How many headings are in this code?
<h1>My pets</h1>
<h3>Our school trip</h3>
<p>Rain today</p>
<h4>My pets</h4> -
23.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Fun facts</p>
<p>Good morning!</p> - 24.🔤 In “HTML”, what does the L stand for? (a) Line (b) Link (c) Language (d) Laptop
- 25.📝 What does <br> do? (a) makes a list (b) starts a new line (c) makes text bold (d) adds a picture
-
26.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>My best friend</h2>
<p>Good morning!</p>
<p>Rain today</p>
<h2>Rain today</h2>
<p>Rain today</p> - 27.True or false: in <img>, width sets how wide it is. (a) True (b) False
- 28.True or false: HTML on its own can make a form. (a) False (b) True
- 29.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
30.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Litchi</li>
</ol> - 31.True or false: <p> goes in the head. (a) True (b) False
- 32.🏷️ Which is the closing tag for <small>? (a) <small> (b) <\small> (c) <small/> (d) </small>
-
33.🔠 How many headings are in this code?
<h1>My pets</h1>
<h4>My pets</h4>
<h2>Cricket is fun.</h2>
<p>My pets</p>
<p>Hello, world!</p> - 34.Which of these is true of a code editor? (a) shows line numbers (b) sends pages over the net (c) turns HTML into a page (d) answers page requests
- 35.True or false: <b> has a closing tag. (a) True (b) False
- 36.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a hash # (c) a dollar $ (d) a dot .
-
37.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>The red kite</p> -->
<p>Cricket is fun.</p>
<p>My best friend</p> - 38.📋 Which list tag lists things in any order? (a) <li> (b) <ul> (c) <ol>
- 39.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <img> (d) <pic>
- 40.True or false: <ul> lists steps in order. (a) True (b) False
Answer key
- Yes
- <html>
- <a href="about.html">
- colours code to help us
- All about me
- <h3>
- bullets
- False
- 2
- A happy dog
- </h1>
- answers page requests
- <h1>
- line 2
- Rain today
- School news
- True
- <!DOCTYPE html>
- is where we type code
- opens web pages for us
- Maths fun
- 3
- 1
- Language
- starts a new line
- 4
- True
- True
- Yes
- 2
- False
- </small>
- 3
- shows line numbers
- True
- a slash /
- 3
- <ul>
- <img>
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids