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>Our school trip</p> -->
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> --> - 2.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</body>”? (a) <!DOCTYPE html> (b) </body>
-
3.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>My best friend</p>
<h2>My pets</h2>
<p>I love mangoes.</p>
<p>My best friend</p> - 4.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
- 5.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
- 6.True or false: <li> is an empty tag. (a) True (b) False
- 7.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
8.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Grapes</li>
<li>Orange</li>
<li>Banana</li>
<li>Mango</li>
<li>Papaya</li>
</ol> - 9.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h6> or <h1>? (a) <h1> (b) <h2> (c) <h6> (d) <h3>
- 10.True or false: HTML on its own can make headings. (a) True (b) False
- 11.📛 In <a href="x.html">, what is href? (a) a comment (b) an attribute (c) an element name (d) a closing tag
- 12.Which of these is an empty tag? (a) <br> (b) <b> (c) <li> (d) <title>
- 13.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 14.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
- 15.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h6> or <h1>? (a) <h1> (b) <h5> (c) <h6> (d) <h4>
-
16.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Match report</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) Match report (c) Space Facts (d) body - 17.🏷️ HTML marks up text using ___. (a) keys (b) pixels (c) tags (d) wires
- 18.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a hash # (c) a dollar $ (d) a slash /
-
19.🔗 Which address opens when you click this link?
<a href="art.html">Play games</a> (a) quiz.html (b) art.html (c) news.html (d) Play games -
20.🔍 Which line is missing its closing tag?
line 1: <h2>My pets</h2>
line 2: <p>Our school trip
line 3: <b>Cricket is fun.</b> (a) line 3 (b) line 2 (c) line 1 -
21.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Mango</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Orange</li>
</ol> -
22.🔍 Which line is missing its closing tag?
line 1: <strong>My best friend</strong>
line 2: <h2>Our school trip
line 3: <h3>Fun facts</h3> (a) line 1 (b) line 3 (c) line 2 -
23.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="50"> (a) width (b) cake.jpg (c) A happy dog (d) Birthday cake - 24.True or false: <hr> has a closing tag. (a) True (b) False
-
25.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>My pets</p> -->
<p>Hello, world!</p>
<p>I love mangoes.</p>
<p>Rain today</p> - 26.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
- 27.📄 Can HTML on its own make a form? (a) No (b) Yes
- 28.True or false: <title> goes in the head. (a) False (b) True
- 29.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ul> (d) <ol>
- 30.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
-
31.🔠 How many headings are in this code?
<h1>My pets</h1>
<h2>My pets</h2>
<h4>Cricket is fun.</h4>
<h4>The red kite</h4> - 32.🌐 Which one is where we type code? (a) a code editor (b) a web server (c) a web browser
- 33.Which of these has a closing tag? (a) <hr> (b) <input> (c) <b> (d) <img>
-
34.🔍 One closing tag is missing. Which one?
<i>Rain today</i>
<u>My pets
<b>Cricket is fun.</b> (a) </h3> (b) </u> (c) </b> (d) </i> -
35.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Rain today</p>
<p>Rain today</p> - 36.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
-
37.🔍 Which line is missing its closing tag?
line 1: <strong>Fun facts</strong>
line 2: <p>The red kite
line 3: <h3>My pets</h3> (a) line 2 (b) line 1 (c) line 3 -
38.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Papaya</li>
<li>Litchi</li>
</ol> (a) numbers (b) bullets - 39.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
-
40.🔗 Which words do you click on?
<a href="quiz.html">School news</a> (a) href (b) quiz.html (c) Take the quiz (d) School news
Answer key
- 1
- <!DOCTYPE html>
- 4
- a web server
- <ol>
- False
- a closing tag
- 6
- <h6>
- True
- an attribute
- <br>
- a closing tag
- a web server
- <h1>
- Match report
- tags
- a slash /
- art.html
- line 2
- 6
- line 2
- Birthday cake
- False
- 4
- a web browser
- Yes
- True
- <ul>
- in the head
- 4
- a code editor
- <b>
- </u>
- 1
- <!DOCTYPE html>
- line 2
- numbers
- opens it in a new tab
- School news
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids