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.🔍 One closing tag is missing. Which one?
<i>Cricket is fun.
<b>Hello, world!</b>
<p>The red kite</p> (a) </p> (b) </b> (c) </i> (d) </h3> -
2.🔗 Which words do you click on?
<a href="about.html">About us</a> (a) Contact us (b) href (c) about.html (d) About us - 3.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
- 4.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dot . (d) a dollar $
- 5.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 4 (d) 10
- 6.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
- 7.True or false: in <img>, alt sets how tall it is. (a) True (b) False
- 8.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
-
9.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="200"> - 10.True or false: in <img>, alt describes the picture. (a) True (b) False
-
11.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="400"> (a) A happy dog (b) The full moon (c) width (d) dog.jpg -
12.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<h2>Hello, world!</h2>
<p>Fun facts</p> - 13.🔍 Which is the odd one out? (a) stores a website’s files (b) opens web pages for us (c) turns HTML into a page (d) shows pages from the web
-
14.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h2>Rain today</h2>
<h3>My best friend</h3>
<p>My pets</p> - 15.🌐 Which one stores a website’s files? (a) a code editor (b) a web server (c) a web browser
-
16.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Cricket is fun.</p>
<p>Cricket is fun.</p>
<p>I love mangoes.</p> - 17.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the doctype (d) the body
- 18.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) High Tech (c) HyperText (d) Home Text
- 19.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 20.💬 Does the browser show comments on the page? (a) No (b) Yes
- 21.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 22.True or false: <ol> is one item of a list. (a) False (b) True
- 23.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
-
24.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>My best friend</p>
<h2>My best friend</h2>
<p>Rain today</p> - 25.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
26.🔍 Which line is missing its closing tag?
line 1: <strong>Our school trip</strong>
line 2: <h2>Hello, world!</h2>
line 3: <h1>Rain today (a) line 2 (b) line 1 (c) line 3 - 27.🔍 Which is the odd one out? (a) turns HTML into a page (b) opens web pages for us (c) saves our .html files (d) has an address bar
- 28.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
- 29.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h4> or <h3>? (a) <h6> (b) <h4> (c) <h1> (d) <h3>
-
30.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h2>The red kite</h2>
<p>I love mangoes.</p>
<h2>Fun facts</h2>
<p>I love mangoes.</p> - 31.🌐 Which one turns HTML into a page? (a) a web browser (b) a web server (c) a code editor
- 32.💬 How does an HTML comment start? (a) /* (b) # (c) <!-- (d) //
- 33.True or false: <img> goes in the head. (a) True (b) False
-
34.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow</p> - 35.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <\h2> (c) <h2/> (d) </h2>
- 36.True or false: <ul> goes in the body. (a) False (b) True
-
37.🔗 Which words do you click on?
<a href="quiz.html">About us</a> (a) Contact us (b) About us (c) href (d) quiz.html - 38.📄 Can HTML on its own make a form? (a) Yes (b) No
- 39.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to leave notes (d) to show pictures
-
40.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>Our school trip</p>
<p>Our school trip</p>
Answer key
- </i>
- About us
- <li>
- a slash /
- 6
- True
- False
- in the body
- 200
- True
- A happy dog
- 2
- stores a website’s files
- 3
- a web server
- 1
- the body
- HyperText
- a closing tag
- No
- Yes
- False
- href
- 3
- Yes
- line 3
- saves our .html files
- opens it in a new tab
- <h1>
- 3
- a web browser
- <!--
- False
- 2
- </h2>
- True
- About us
- Yes
- to leave notes
- 1
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids