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 does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
- 2.Which of these is a closing tag? (a) <title> (b) <li> (c) <h1> (d) </b>
- 3.Which of these is true of a web browser? (a) turns HTML into a page (b) saves our .html files (c) shows line numbers (d) colours code to help us
-
4.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>Our school trip</p>
<p>My best friend</p>
<h2>The red kite</h2>
<p>My pets</p> -
5.🔍 Which line is missing its closing tag?
line 1: <h2>Our school trip
line 2: <i>My best friend</i>
line 3: <small>Hello, world!</small> (a) line 3 (b) line 1 (c) line 2 -
6.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>The red kite</p>
<h3>My best friend</h3> - 7.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h5> or <h1>? (a) <h4> (b) <h1> (c) <h3> (d) <h5>
- 8.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) on the browser tab (d) nowhere
- 9.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 10.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h2> or <h5>? (a) <h1> (b) <h3> (c) <h2> (d) <h5>
-
11.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>The red kite</p> -->
<p>Cricket is fun.</p>
<p>Good morning!</p> (a) Rain today (b) The red kite (c) Cricket is fun. (d) Good morning! -
12.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>The red kite</p>
<h2>Our school trip</h2>
<h2>The red kite</h2> - 13.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
14.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Our school trip</p>
<p>Fun facts</p>
<p>My best friend</p> (a) Fun facts (b) My best friend (c) The red kite (d) Our school trip - 15.🏷️ Which is the closing tag for <h3>? (a) <h3> (b) <h3/> (c) <\h3> (d) </h3>
- 16.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h4> or <h6>? (a) <h6> (b) <h3> (c) <h5> (d) <h4>
-
17.🔗 Which words do you click on?
<a href="maths.html">Play games</a> (a) Play games (b) maths.html (c) href (d) About us - 18.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 19.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 20.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) opens it in a new tab (d) makes it bold
-
21.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Our school trip</p> -->
<p>Rain today</p>
<!-- <p>I love mangoes.</p> -->
<p>My best friend</p> - 22.Which of these is true of a web server? (a) hosts websites online (b) shows pages from the web (c) colours code to help us (d) is where we type code
-
23.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Rain today</p>
<p>Hello, world!</p>
<p>Hello, world!</p> -
24.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<h2>Good morning!</h2>
<p>Fun facts</p> - 25.Which of these is true of a web browser? (a) sends pages over the net (b) hosts websites online (c) opens web pages for us (d) saves our .html files
- 26.📄 What is the first line of an HTML5 page? (a) <head> (b) <!DOCTYPE html> (c) <body> (d) <html>
- 27.True or false: <ul> lists things in any order. (a) True (b) False
- 28.True or false: a web browser turns HTML into a page. (a) True (b) False
- 29.🌐 Which one colours code to help us? (a) a code editor (b) a web server (c) a web browser
- 30.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h2>? (a) <h2> (b) <h1> (c) <h3> (d) <h5>
- 31.🔍 Which is the odd one out? (a) shows pages from the web (b) opens web pages for us (c) saves our .html files (d) turns HTML into a page
- 32.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to make it bigger (d) to describe the image
- 33.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 34.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 35.Which of these is an empty tag? (a) <h1> (b) <ul> (c) <hr> (d) <title>
- 36.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 10 (d) 3
- 37.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <li> (c) <ul>
-
38.🔍 Which line is missing its closing tag?
line 1: <b>Rain today</b>
line 2: <h3>My best friend
line 3: <small>Good morning!</small> (a) line 1 (b) line 3 (c) line 2 - 39.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Markup (d) Machine
- 40.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h6> or <h3>? (a) <h4> (b) <h6> (c) <h1> (d) <h3>
Answer key
- <!--
- </b>
- turns HTML into a page
- 4
- line 1
- 2
- <h5>
- on the browser tab
- an opening tag
- <h5>
- The red kite
- 2
- an empty tag
- The red kite
- </h3>
- <h3>
- Play games
- has a closing tag
- has a closing tag
- opens it in a new tab
- 2
- hosts websites online
- 1
- 2
- opens web pages for us
- <!DOCTYPE html>
- True
- True
- a code editor
- <h1>
- saves our .html files
- to describe the image
- in the head
- Yes
- <hr>
- 1
- <li>
- line 2
- Markup
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids