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 address opens when you click this link?
<a href="about.html">Art corner</a> (a) Art corner (b) https://example.com (c) contact.html (d) about.html - 2.True or false: <p> is an empty tag. (a) True (b) False
- 3.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
-
4.🔗 Which words do you click on?
<a href="maths.html">Play games</a> (a) maths.html (b) About us (c) href (d) Play games -
5.🔍 Which line is missing its closing tag?
line 1: <h3>Our school trip</h3>
line 2: <i>I love mangoes.
line 3: <em>My best friend</em> (a) line 1 (b) line 3 (c) line 2 -
6.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h2>Hello, world!</h2>
<p>Fun facts</p> - 7.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a hash # (d) a slash /
-
8.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Grapes</li>
<li>Papaya</li>
<li>Guava</li>
</ol> - 9.True or false: HTML on its own can make a form. (a) False (b) True
- 10.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
11.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Litchi</li>
<li>Orange</li>
<li>Papaya</li>
<li>Grapes</li>
</ol> - 12.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <p> (d) <ol>
- 13.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
- 14.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 15.True or false: in <img>, height names the picture file. (a) True (b) False
- 16.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
- 17.True or false: a web browser colours code to help us. (a) True (b) False
- 18.🖼️ Which tag puts a picture on a page? (a) <img> (b) <p> (c) <a> (d) <pic>
- 19.True or false: <ol> lists steps in order. (a) False (b) True
-
20.🔍 One closing tag is missing. Which one?
<h1>My pets
<p>Fun facts</p>
<h3>Cricket is fun.</h3> (a) </p> (b) </u> (c) </h1> (d) </h3> - 21.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
- 22.💬 How does an HTML comment end? (a) --> (b) >> (c) // (d) */
-
23.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> --> - 24.True or false: HTML on its own can run a game loop. (a) True (b) False
-
25.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>My pets</p>
<p>Hello, world!</p> (a) My pets (b) Hello, world! (c) Cricket is fun. - 26.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
-
27.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Fun facts</p>
<p>Our school trip</p>
<p>Hello, world!</p> - 28.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) hides the link (d) opens it in a new tab
-
29.🔗 Which address opens when you click this link?
<a href="games.html">Contact us</a> (a) Contact us (b) games.html (c) about.html (d) contact.html - 30.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h3> or <h2>? (a) <h2> (b) <h1> (c) <h4> (d) <h3>
-
31.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue<br>Birds sing</p> - 32.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 33.True or false: a web server turns HTML into a page. (a) True (b) False
- 34.📄 Can HTML on its own pick a random number? (a) No (b) Yes
- 35.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <html> (d) <!DOCTYPE html>
-
36.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>My best friend</p>
<p>I love mangoes.</p>
<!-- <p>The red kite</p> -->
<p>Rain today</p> -
37.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> --> - 38.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 39.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h2> or <h1>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
- 40.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <h6> (d) <p>
Answer key
- about.html
- False
- to leave notes
- Play games
- line 2
- 2
- a slash /
- 2
- True
- Yes
- 5
- <li>
- <a>
- has a closing tag
- False
- a web server
- False
- <img>
- True
- </h1>
- <ul>
- -->
- 2
- False
- Cricket is fun.
- in the body
- 1
- opens it in a new tab
- games.html
- <h1>
- 3
- No
- False
- No
- <!DOCTYPE html>
- 4
- 1
- a closing tag
- <h1>
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids