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 text will NOT show on the page?
<p>Fun facts</p>
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p> (a) Fun facts (b) I love mangoes. (c) Hello, world! -
2.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="300"> - 3.📝 What do we need to write HTML? (a) a printer (b) a paintbrush (c) a microphone (d) a plain text editor
- 4.True or false: <title> is an empty tag. (a) True (b) False
- 5.Which of these goes in the head? (a) <p> (b) <a> (c) <h1> (d) <style>
- 6.True or false: <title> goes in the body. (a) False (b) True
- 7.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h5> or <h3>? (a) <h3> (b) <h1> (c) <h4> (d) <h5>
- 8.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) src (d) id
- 9.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) element (d) attribute
- 10.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
-
11.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>Cricket is fun.</p>
<p>Cricket is fun.</p>
<p>Our school trip</p> - 12.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 13.📝 What does <p> make? (a) a link (b) a paragraph (c) a picture (d) a table
-
14.🔗 Which address opens when you click this link?
<a href="games.html">Maths fun</a> (a) about.html (b) games.html (c) contact.html (d) Maths fun - 15.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) width (d) height
-
16.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Our school trip</p>
<p>Fun facts</p> -
17.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) Class 7 Blog (b) Mars is red. (c) body (d) Welcome! - 18.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h6>? (a) <h1> (b) <h4> (c) <h6> (d) <h5>
- 19.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) height (d) width
- 20.True or false: <a> goes in the head. (a) True (b) False
- 21.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) ( (d) {
- 22.Which of these is an empty tag? (a) <hr> (b) <title> (c) <p> (d) <b>
- 23.True or false: in <img>, alt shows if the image fails. (a) False (b) True
- 24.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a hash # (d) a dollar $
-
25.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Rain today</p>
<!-- <p>Cricket is fun.</p> -->
<p>Hello, world!</p> (a) Cricket is fun. (b) Hello, world! (c) Fun facts (d) Rain today -
26.🔗 Which words do you click on?
<a href="maths.html">About us</a> (a) maths.html (b) href (c) About us (d) Contact us - 27.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 28.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
-
29.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) Welcome! (c) Space Facts (d) body - 30.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h2> or <h4>? (a) <h4> (b) <h1> (c) <h6> (d) <h2>
- 31.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a new line (c) as a dot (d) as 5 spaces
-
32.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>My best friend</p>
<p>Hello, world!</p>
<p>Hello, world!</p>
<p>My pets</p> -
33.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Rain today</p>
<p>The red kite</p>
<p>My best friend</p> (a) My best friend (b) Rain today (c) My pets (d) The red kite - 34.Which of these is an opening tag? (a) <h1> (b) </h1> (c) </b> (d) </li>
-
35.📋 What number does the browser show next to “Orange”?
<ol start="4">
<li>Banana</li>
<li>Orange</li>
<li>Grapes</li>
</ol> - 36.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <html> (d) <head>
-
37.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Papaya</li>
</ul> (a) bullets (b) numbers - 38.True or false: HTML on its own can run a game loop. (a) False (b) True
-
39.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Cricket is fun.</p>
<!-- <p>My best friend</p> --> (a) My pets (b) My best friend (c) Cricket is fun. - 40.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <link> (d) <img>
Answer key
- I love mangoes.
- 300
- a plain text editor
- False
- <style>
- False
- <h5>
- href
- element
- <ul>
- 4
- Yes
- a paragraph
- games.html
- alt
- 3
- Welcome!
- <h6>
- width
- False
- <
- <hr>
- True
- a slash /
- Cricket is fun.
- About us
- has a closing tag
- 1
- Welcome!
- <h6>
- as one space
- 5
- My pets
- <h1>
- 5
- <!DOCTYPE html>
- bullets
- False
- My best friend
- <a>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids