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 is the odd one out? (a) is where we type code (b) turns HTML into a page (c) colours code to help us (d) saves our .html files
- 2.🏷️ Which is the closing tag for <small>? (a) <small/> (b) </small> (c) <\small> (d) <small>
- 3.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h6> (d) <h1>
- 4.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 5.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 6.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 7.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) alt (d) src
- 8.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as a new line (d) as one space
-
9.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>My pets</p>
<p>Good morning!</p>
<p>Fun facts</p> (a) My pets (b) Good morning! (c) Fun facts (d) Hello, world! - 10.True or false: <a> goes in the head. (a) False (b) True
- 11.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <p> (d) <li>
- 12.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
13.📋 What number does the browser show next to “Papaya”?
<ol start="4">
<li>Mango</li>
<li>Banana</li>
<li>Orange</li>
<li>Papaya</li>
<li>Jamun</li>
</ol> - 14.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) ( (d) <
- 15.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <link about.html>
- 16.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h1> or <h3>? (a) <h1> (b) <h5> (c) <h3> (d) <h6>
-
17.🔍 One closing tag is missing. Which one?
<h2>Fun facts
<i>The red kite</i>
<p>Cricket is fun.</p> (a) </i> (b) </em> (c) </p> (d) </h2> -
18.🔍 One closing tag is missing. Which one?
<u>Good morning!</u>
<em>The red kite
<h1>I love mangoes.</h1> (a) </h1> (b) </h2> (c) </u> (d) </em> - 19.Which of these is true of a web browser? (a) answers page requests (b) shows line numbers (c) turns HTML into a page (d) stores a website’s files
- 20.Which of these is true of a web browser? (a) answers page requests (b) opens web pages for us (c) saves our .html files (d) is where we type code
- 21.True or false: <ul> has a closing tag. (a) False (b) True
- 22.Which of these is true of a web browser? (a) shows pages from the web (b) sends pages over the net (c) shows line numbers (d) hosts websites online
- 23.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) an attribute (d) a closing tag
- 24.🏷️ Which is the closing tag for <i>? (a) <i> (b) <\i> (c) </i> (d) <i/>
- 25.True or false: HTML on its own can add up two numbers. (a) True (b) False
- 26.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a hash # (d) a dot .
- 27.🏷️ Which is the closing tag for <u>? (a) <u> (b) <\u> (c) <u/> (d) </u>
-
28.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>Hello, world!</p> -->
<p>The red kite</p>
<!-- <p>Good morning!</p> -->
<!-- <p>I love mangoes.</p> --> -
29.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>I love mangoes.</p> -->
<p>Rain today</p>
<p>The red kite</p> (a) The red kite (b) Our school trip (c) Rain today (d) I love mangoes. - 30.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
- 31.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 3 (d) 10
- 32.💬 How does an HTML comment end? (a) // (b) >> (c) */ (d) -->
-
33.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Litchi</li>
</ol> - 34.🌐 Which one is where we type code? (a) a web browser (b) a web server (c) a code editor
- 35.💬 How does an HTML comment start? (a) # (b) // (c) /* (d) <!--
- 36.🌐 Which one answers page requests? (a) a web browser (b) a web server (c) a code editor
-
37.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>I love mangoes.</p>
<p>My pets</p>
<!-- <p>Good morning!</p> --> (a) My pets (b) I love mangoes. (c) Fun facts (d) Good morning! - 38.🔍 Which is the odd one out? (a) shows pages from the web (b) has an address bar (c) turns HTML into a page (d) hosts websites online
- 39.True or false: <table> goes in the head. (a) True (b) False
-
40.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Try this poha.</p>
</body>
</html> (a) Welcome! (b) Try this poha. (c) Class 7 Blog (d) index.html
Answer key
- turns HTML into a page
- </small>
- <h1>
- has a closing tag
- a closing tag
- an opening tag
- alt
- as one space
- Hello, world!
- False
- <li>
- an empty tag
- 7
- <
- <a href="about.html">
- <h1>
- </h2>
- </em>
- turns HTML into a page
- opens web pages for us
- True
- shows pages from the web
- an attribute
- </i>
- False
- a slash /
- </u>
- 1
- I love mangoes.
- in the body
- 6
- -->
- 2
- a code editor
- <!--
- a web server
- Good morning!
- hosts websites online
- False
- Class 7 Blog
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids