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>Cricket is fun.</p> -->
<p>Our school trip</p>
<p>Fun facts</p> - 2.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
-
3.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>My best friend</h2>
<h2>My best friend</h2>
<h2>Our school trip</h2>
<h2>I love mangoes.</h2> -
4.🔗 Which address opens when you click this link?
<a href="maths.html">Contact us</a> (a) news.html (b) maths.html (c) art.html (d) Contact us - 5.🌐 Which one hosts websites online? (a) a web browser (b) a code editor (c) a web server
-
6.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Fun facts</p>
<!-- <p>Rain today</p> -->
<!-- <p>My best friend</p> --> - 7.Which of these is an opening tag? (a) <li> (b) </h1> (c) </body> (d) </p>
- 8.True or false: <img> goes in the body. (a) False (b) True
- 9.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
10.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="400"> (a) An old fort (b) bus.jpg (c) width (d) Our school bus -
11.🔗 Which words do you click on?
<a href="news.html">School news</a> (a) href (b) news.html (c) School news (d) Take the quiz -
12.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>Rain today</h2>
<h2>Rain today</h2>
<h2>Cricket is fun.</h2>
<h2>Fun facts</h2> - 13.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2> (c) <h2/> (d) </h2>
- 14.True or false: a code editor shows line numbers. (a) True (b) False
- 15.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
- 16.True or false: HTML on its own can run a game loop. (a) True (b) False
-
17.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) Easy snacks (c) Class 7 Blog (d) index.html -
18.📋 What number does the browser show next to “Papaya”?
<ol start="4">
<li>Mango</li>
<li>Banana</li>
<li>Guava</li>
<li>Orange</li>
<li>Papaya</li>
</ol> - 19.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h6>? (a) <h1> (b) <h3> (c) <h6> (d) <h5>
- 20.True or false: HTML on its own cannot count button clicks. (a) True (b) False
- 21.Which of these has a closing tag? (a) <meta> (b) <hr> (c) <input> (d) <title>
-
22.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="150"> - 23.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h4> or <h1>? (a) <h6> (b) <h4> (c) <h2> (d) <h1>
- 24.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h5> or <h1>? (a) <h6> (b) <h3> (c) <h1> (d) <h5>
- 25.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h3>? (a) <h5> (b) <h2> (c) <h3> (d) <h1>
- 26.True or false: a web browser saves our .html files. (a) True (b) False
- 27.🔠 Which tag is the least important heading? (a) <h6> (b) <p> (c) <h3> (d) <h1>
-
28.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p> (a) I love mangoes. (b) The red kite (c) Good morning! - 29.Which of these is an opening tag? (a) </p> (b) <title> (c) </li> (d) </h1>
- 30.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
- 31.🧱 HTML gives a web page its ___. (a) colours (b) sound (c) speed (d) structure
-
32.🔗 Which words do you click on?
<a href="maths.html">Art corner</a> (a) maths.html (b) Art corner (c) href (d) School news - 33.🌐 Which one sends pages over the net? (a) a web browser (b) a code editor (c) a web server
- 34.Which of these goes in the head? (a) <p> (b) <table> (c) <img> (d) <title>
- 35.True or false: <meta> has a closing tag. (a) False (b) True
-
36.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>All about me</h1>
<p>I like to read.</p>
</body>
</html> (a) Riya’s Recipes (b) body (c) All about me (d) I like to read. - 37.Which of these is true of a web browser? (a) colours code to help us (b) stores a website’s files (c) saves our .html files (d) turns HTML into a page
-
38.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>Fun facts</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Cricket is fun.</p> - 39.🖼️ Which attribute of <img> names the picture file? (a) height (b) width (c) alt (d) src
- 40.Which of these is a closing tag? (a) <title> (b) <h1> (c) </h1> (d) <body>
Answer key
- 2
- on the browser tab
- 1
- maths.html
- a web server
- 1
- <li>
- True
- an opening tag
- Our school bus
- School news
- 1
- </h2>
- True
- in the body
- False
- Class 7 Blog
- 8
- <h1>
- True
- <title>
- 150
- <h6>
- <h6>
- <h5>
- False
- <h6>
- Good morning!
- <title>
- in the body
- structure
- Art corner
- a web server
- <title>
- False
- All about me
- turns HTML into a page
- 2
- src
- </h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids