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.True or false: <ul> is an unordered list. (a) False (b) True
-
2.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Litchi</li>
<li>Banana</li>
<li>Guava</li>
</ol> - 3.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 4.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h4>? (a) <h3> (b) <h4> (c) <h1> (d) <h5>
-
5.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>Our school trip</p> -->
<p>My best friend</p>
<!-- <p>Good morning!</p> -->
<p>The red kite</p> - 6.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h1> or <h2>? (a) <h6> (b) <h1> (c) <h5> (d) <h2>
-
7.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>My best friend</p>
<p>Our school trip</p> (a) My best friend (b) Our school trip (c) Hello, world! - 8.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
-
9.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>My best friend</p> -->
<p>Good morning!</p>
<p>Our school trip</p> - 10.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
- 11.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
12.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>My pets</p> -->
<p>The red kite</p>
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p> -
13.📋 What number does the browser show next to “Papaya”?
<ol start="7">
<li>Banana</li>
<li>Mango</li>
<li>Papaya</li>
</ol> - 14.Which of these is an opening tag? (a) </p> (b) </b> (c) </li> (d) <p>
- 15.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) opens it in a new tab (d) hides the link
- 16.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) width (c) alt (d) src
- 17.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h6> or <h1>? (a) <h3> (b) <h5> (c) <h1> (d) <h6>
- 18.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
-
19.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>I love mangoes.</p>
<p>Our school trip</p> - 20.Which of these is true of a web browser? (a) shows line numbers (b) opens web pages for us (c) hosts websites online (d) stores a website’s files
-
21.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) index.html (c) Class 7 Blog (d) Welcome! - 22.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 23.🔍 Which is the odd one out? (a) stores a website’s files (b) answers page requests (c) hosts websites online (d) has an address bar
-
24.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>The red kite</h2>
<p>I love mangoes.</p> -
25.🔍 One closing tag is missing. Which one?
<p>Rain today
<h2>The red kite</h2>
<em>I love mangoes.</em> (a) </h2> (b) </h3> (c) </p> (d) </em> -
26.🔍 One closing tag is missing. Which one?
<h1>My best friend</h1>
<small>Rain today
<h2>Cricket is fun.</h2> (a) </h2> (b) </u> (c) </h1> (d) </small> -
27.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>Our school trip</p>
<p>My pets</p>
<!-- <p>Fun facts</p> --> (a) Fun facts (b) Rain today (c) My pets (d) Our school trip - 28.True or false: HTML on its own cannot make headings. (a) True (b) False
- 29.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
- 30.📄 Can HTML on its own make a form? (a) Yes (b) No
- 31.📝 What does <p> make? (a) a picture (b) a link (c) a paragraph (d) a table
- 32.🖼️ Which attribute of <img> describes the picture? (a) src (b) alt (c) height (d) width
- 33.🏷️ Every HTML tag starts with which sign? (a) { (b) < (c) ( (d) [
- 34.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) alt (d) height
- 35.🖼️ Which attribute of <img> tells which image to load? (a) height (b) alt (c) src (d) width
- 36.True or false: a web browser shows pages from the web. (a) True (b) False
-
37.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Mango</li>
<li>Papaya</li>
<li>Orange</li>
</ul> - 38.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a href="about.html">
-
39.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Planets</h1>
<p>I like to read.</p>
</body>
</html> (a) index.html (b) I like to read. (c) Planets (d) Art Gallery -
40.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>Cricket is fun.</h2>
<h2>Good morning!</h2>
<h2>Good morning!</h2>
<h2>Fun facts</h2>
<h2>The red kite</h2>
Answer key
- True
- 4
- in the head
- <h1>
- 3
- <h1>
- Hello, world!
- Yes
- 3
- in the head
- an opening tag
- 2
- 9
- <p>
- opens it in a new tab
- alt
- <h6>
- <!DOCTYPE html>
- 3
- opens web pages for us
- Class 7 Blog
- a closing tag
- has an address bar
- 2
- </p>
- </small>
- Fun facts
- False
- <ol>
- Yes
- a paragraph
- alt
- <
- src
- src
- True
- 6
- <a href="about.html">
- Art Gallery
- 1
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids