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: <style> goes in the body. (a) True (b) False
- 2.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h6> (c) <h1> (d) <p>
- 3.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
-
4.🔗 Where does this link open?
<a href="contact.html">School news</a> (a) in the same tab (b) in a new tab - 5.📋 Which list tag is an ordered list? (a) <li> (b) <ul> (c) <ol>
-
6.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>The red kite</p> -->
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p>
<p>Our school trip</p> -
7.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>Hello, world!</h2>
<p>Cricket is fun.</p>
<p>Cricket is fun.</p> -
8.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>I love mangoes.</p>
<h2>My best friend</h2>
<p>Good morning!</p> - 9.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 10.True or false: <b> is an empty tag. (a) False (b) True
- 11.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 12.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
-
13.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>The red kite</p>
<!-- <p>Good morning!</p> --> - 14.🌐 Which one shows pages from the web? (a) a web browser (b) a web server (c) a code editor
- 15.True or false: a code editor has an address bar. (a) True (b) False
-
16.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Stars shine<br>Roses are red<br>Sky is blue<br>Kites fly high</p> -
17.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) bus.jpg (b) tiger.jpg (c) fort.jpg (d) Our school bus - 18.True or false: <img> is an empty tag. (a) False (b) True
-
19.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Fun facts</p>
<!-- <p>Hello, world!</p> --> (a) I love mangoes. (b) Fun facts (c) Hello, world! -
20.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>I love mangoes.</p>
<p>Hello, world!</p>
<p>Our school trip</p> (a) Hello, world! (b) Our school trip (c) I love mangoes. (d) Rain today - 21.🌐 Which one has an address bar? (a) a web browser (b) a web server (c) a code editor
- 22.True or false: a web server has an address bar. (a) True (b) False
-
23.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Roses are red<br>Rivers flow<br>Sky is blue<br>Birds sing</p> - 24.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
- 25.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <h2> (d) <\h2>
- 26.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) <html> (c) <!DOCTYPE html> (d) <body>
- 27.📄 Can HTML on its own make headings? (a) No (b) Yes
-
28.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p>
<!-- <p>My pets</p> --> -
29.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Kites fly high<br>Roses are red<br>Birds sing<br>Stars shine</p> -
30.🔗 Which words do you click on?
<a href="news.html">Maths fun</a> (a) news.html (b) Maths fun (c) href (d) Art corner -
31.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>Good morning!</h2>
<h2>My pets</h2> - 32.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h2> or <h1>? (a) <h1> (b) <h4> (c) <h5> (d) <h2>
- 33.True or false: a code editor opens web pages for us. (a) True (b) False
- 34.📄 Can HTML on its own keep a high score? (a) Yes (b) No
- 35.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to show pictures (d) to add colour
-
36.🔍 One closing tag is missing. Which one?
<h2>My best friend
<em>My pets</em>
<p>Cricket is fun.</p> (a) </small> (b) </p> (c) </h2> (d) </em> - 37.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">
- 38.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <ul> (d) <p>
- 39.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
-
40.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>My best friend</p>
<p>Good morning!</p>
<h3>Our school trip</h3>
Answer key
- False
- <h1>
- <ol>
- in the same tab
- <ol>
- 2
- 3
- 2
- in the head
- False
- a closing tag
- <ul>
- 1
- a web browser
- False
- 5
- bus.jpg
- True
- Hello, world!
- Rain today
- a web browser
- False
- 5
- -->
- </h2>
- <!DOCTYPE html>
- Yes
- 2
- 5
- Maths fun
- 1
- <h1>
- False
- No
- to leave notes
- </h2>
- <a href="about.html">
- <li>
- in the body
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids