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: in <img>, width sets how wide it is. (a) False (b) True
- 2.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
-
3.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Jamun</li>
<li>Orange</li>
</ol> (a) numbers (b) bullets -
4.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h3>Fun facts</h3>
<p>My pets</p> - 5.True or false: <img> goes in the head. (a) True (b) False
- 6.📋 Which list suits a shopping list in any order? (a) <ul> (b) <hr> (c) <br> (d) <ol>
- 7.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
8.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>My best friend</p>
<!-- <p>I love mangoes.</p> -->
<p>Good morning!</p> (a) My best friend (b) Our school trip (c) I love mangoes. (d) Good morning! - 9.Which of these goes in the head? (a) <h1> (b) <p> (c) <ul> (d) <link rel="stylesheet">
-
10.🔗 Which words do you click on?
<a href="art.html">About us</a> (a) About us (b) art.html (c) Contact us (d) href -
11.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>Fun facts</h2>
<p>Fun facts</p>
<p>Good morning!</p> - 12.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 13.🔗 What does HyperText mean? (a) text with links (b) very big text (c) secret text (d) text in colour
-
14.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Birds sing<br>Rivers flow<br>Kites fly high</p> - 15.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <li> (d) <ul>
-
16.🔗 Where does this link open?
<a href="games.html" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab - 17.🔍 Which is the odd one out? (a) stores a website’s files (b) hosts websites online (c) answers page requests (d) opens web pages for us
-
18.🔗 Which address opens when you click this link?
<a href="contact.html">Take the quiz</a> (a) contact.html (b) Take the quiz (c) https://example.com (d) maths.html - 19.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as one space (c) as a dot (d) as a new line
- 20.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 21.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h1> (d) <h6>
-
22.🔍 Which line is missing its closing tag?
line 1: <i>Rain today</i>
line 2: <h2>My pets
line 3: <u>Our school trip</u> (a) line 2 (b) line 1 (c) line 3 - 23.True or false: a web server is where we type code. (a) True (b) False
-
24.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>Cricket is fun.</p> -->
<p>Good morning!</p>
<p>The red kite</p> (a) Good morning! (b) My pets (c) The red kite (d) Cricket is fun. - 25.🌐 Which one sends pages over the net? (a) a web server (b) a code editor (c) a web browser
- 26.🔍 Which is the odd one out? (a) turns HTML into a page (b) has an address bar (c) stores a website’s files (d) opens web pages for us
- 27.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the body (d) the head
- 28.True or false: in <img>, src is read by screen readers. (a) True (b) False
- 29.Which of these is true of a code editor? (a) turns HTML into a page (b) saves our .html files (c) hosts websites online (d) shows pages from the web
- 30.Which of these has a closing tag? (a) <hr> (b) <br> (c) <input> (d) <ul>
-
31.🔗 Which words do you click on?
<a href="art.html">School news</a> (a) href (b) art.html (c) School news (d) Take the quiz -
32.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Our school trip</p>
<p>I love mangoes.</p>
<p>Cricket is fun.</p> (a) Our school trip (b) Cricket is fun. (c) The red kite (d) I love mangoes. - 33.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) src (c) height (d) width
- 34.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 1 (d) 10
- 35.True or false: HTML on its own cannot make links to pages. (a) False (b) True
- 36.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h2> or <h4>? (a) <h2> (b) <h1> (c) <h4> (d) <h6>
- 37.Which of these is true of a web server? (a) opens web pages for us (b) shows line numbers (c) stores a website’s files (d) is where we type code
- 38.True or false: <table> goes in the body. (a) False (b) True
- 39.True or false: <ol> goes inside ul or ol. (a) False (b) True
- 40.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
Answer key
- True
- in the body
- numbers
- 2
- False
- <ul>
- a closing tag
- I love mangoes.
- <link rel="stylesheet">
- About us
- 3
- Yes
- text with links
- 4
- <li>
- in a new tab
- opens web pages for us
- contact.html
- as one space
- No
- <h1>
- line 2
- False
- Cricket is fun.
- a web server
- stores a website’s files
- the body
- False
- saves our .html files
- <ul>
- School news
- The red kite
- alt
- 1
- False
- <h6>
- stores a website’s files
- True
- False
- has a closing tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids