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 one shows line numbers? (a) a web server (b) a code editor (c) a web browser
-
2.🔗 Which address opens when you click this link?
<a href="quiz.html">Take the quiz</a> (a) games.html (b) about.html (c) quiz.html (d) Take the quiz - 3.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) src (d) width
- 4.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 5.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 6.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to show pictures (d) to make links
-
7.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>Our school trip</p>
<!-- <p>Rain today</p> --> -
8.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>Rain today</p>
<p>My pets</p> (a) Rain today (b) Good morning! (c) My pets -
9.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>I love mangoes.</p> -->
<p>My pets</p>
<p>Rain today</p> (a) Rain today (b) I love mangoes. (c) My best friend (d) My pets -
10.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>Fun facts</p>
<!-- <p>Hello, world!</p> --> -
11.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>Our school trip</h2>
<p>Cricket is fun.</p>
<p>The red kite</p>
<p>Cricket is fun.</p> - 12.📛 In <a href="x.html">, what is href? (a) a comment (b) an attribute (c) a closing tag (d) an element name
-
13.🔗 Which words do you click on?
<a href="https://example.com">Contact us</a> (a) https://example.com (b) href (c) Contact us (d) Visit the site - 14.True or false: HTML on its own can add pictures to a page. (a) False (b) True
- 15.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) alt (c) src (d) width
-
16.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>Hello, world!</p>
<!-- <p>Good morning!</p> --> - 17.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 18.True or false: <ul> lists things in any order. (a) False (b) True
-
19.🔗 Which words do you click on?
<a href="news.html">School news</a> (a) School news (b) href (c) Take the quiz (d) news.html - 20.True or false: <br> is an empty tag. (a) False (b) True
-
21.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p>
<!-- <p>Fun facts</p> --> -
22.🔍 One closing tag is missing. Which one?
<i>My best friend
<h3>Rain today</h3>
<h1>Good morning!</h1> (a) </h3> (b) </i> (c) </h1> (d) </em> -
23.🔗 Where does this link open?
<a href="news.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab - 24.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h2> or <h6>? (a) <h1> (b) <h3> (c) <h2> (d) <h6>
- 25.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Mouse (c) Machine (d) Modern
- 26.Which of these is true of a web browser? (a) sends pages over the net (b) is where we type code (c) saves our .html files (d) opens web pages for us
- 27.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 28.🏷️ Which is the closing tag for <small>? (a) <\small> (b) </small> (c) <small/> (d) <small>
-
29.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Litchi</li>
</ul> (a) numbers (b) bullets -
30.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Planets</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) Cricket Club (c) Planets (d) body - 31.True or false: a web browser has an address bar. (a) False (b) True
- 32.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 3 (d) 10
- 33.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h6> (b) <h1> (c) <h3> (d) <h2>
- 34.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 35.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <p> (d) <pic>
-
36.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Grapes</li>
<li>Guava</li>
</ul> - 37.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h4>? (a) <h2> (b) <h5> (c) <h4> (d) <h1>
- 38.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h6> or <h3>? (a) <h4> (b) <h1> (c) <h3> (d) <h6>
- 39.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h6>? (a) <h3> (b) <h6> (c) <h4> (d) <h2>
- 40.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
Answer key
- a code editor
- quiz.html
- alt
- Yes
- a closing tag
- to leave notes
- 2
- Good morning!
- I love mangoes.
- 2
- 4
- an attribute
- Contact us
- True
- width
- 2
- a closing tag
- True
- School news
- True
- 1
- </i>
- in a new tab
- <h6>
- Markup
- opens web pages for us
- No
- </small>
- bullets
- Planets
- True
- 1
- <h1>
- Yes
- <img>
- 3
- <h1>
- <h1>
- <h2>
- an empty tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids