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 of these is true of a web server? (a) saves our .html files (b) turns HTML into a page (c) shows pages from the web (d) sends pages over the net
- 2.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
- 3.Which of these is an opening tag? (a) </li> (b) </title> (c) </h1> (d) <body>
- 4.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h2>? (a) <h3> (b) <h1> (c) <h5> (d) <h2>
- 5.📄 Can HTML on its own keep a high score? (a) Yes (b) No
- 6.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
- 7.🔍 Which is the odd one out? (a) turns HTML into a page (b) stores a website’s files (c) opens web pages for us (d) has an address bar
- 8.True or false: <link rel="stylesheet"> goes in the head. (a) True (b) False
-
9.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="350"> (a) width (b) kite.png (c) Map of India (d) A red kite -
10.🔍 Which line is missing its closing tag?
line 1: <h2>My pets
line 2: <b>Rain today</b>
line 3: <u>I love mangoes.</u> (a) line 1 (b) line 3 (c) line 2 - 11.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) src (c) alt (d) height
- 12.🏷️ Which is the closing tag for <b>? (a) </b> (b) <b/> (c) <b> (d) <\b>
-
13.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Fun facts</p>
<!-- <p>Cricket is fun.</p> --> (a) Fun facts (b) Good morning! (c) Cricket is fun. - 14.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
- 15.True or false: <li> goes inside ul or ol. (a) False (b) True
-
16.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Mango</li>
<li>Jamun</li>
</ul> -
17.📋 What number does the browser show next to “Grapes”?
<ol start="5">
<li>Jamun</li>
<li>Banana</li>
<li>Grapes</li>
</ol> - 18.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 19.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <ul> (d) <li>
- 20.Which of these is a closing tag? (a) <b> (b) <h1> (c) <title> (d) </li>
- 21.True or false: in <img>, alt tells which image to load. (a) True (b) False
-
22.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>Fun facts</p> -->
<!-- <p>Good morning!</p> -->
<!-- <p>Rain today</p> -->
<!-- <p>The red kite</p> --> -
23.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="50"> (a) A tiger asleep (b) fort.jpg (c) width (d) An old fort - 24.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h6> or <h3>? (a) <h6> (b) <h4> (c) <h3> (d) <h2>
- 25.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<body>”? (a) <!DOCTYPE html> (b) <body>
-
26.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p> -
27.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Roses are red<br>Sky is blue<br>Kites fly high</p> -
28.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>My best friend</p> -->
<p>I love mangoes.</p> - 29.Which of these is an opening tag? (a) </p> (b) </body> (c) </h1> (d) <b>
-
30.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>My drawings</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) body (b) Cricket Club (c) Thanks for visiting. (d) My drawings - 31.🌐 Which one shows line numbers? (a) a web server (b) a web browser (c) a code editor
-
32.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>Our school trip</p>
<p>Our school trip</p> - 33.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as one space (d) as a dot
- 34.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
-
35.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>I love mangoes.</p>
<p>Good morning!</p>
<!-- <p>Rain today</p> --> (a) I love mangoes. (b) My pets (c) Good morning! (d) Rain today - 36.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
- 37.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 38.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
- 39.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) height (d) alt
-
40.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p>
<p>Our school trip</p>
Answer key
- sends pages over the net
- True
- <body>
- <h1>
- No
- to leave notes
- stores a website’s files
- True
- A red kite
- line 1
- alt
- </b>
- Cricket is fun.
- <ol>
- True
- 3
- 7
- a closing tag
- <li>
- </li>
- False
- 1
- An old fort
- <h2>
- <!DOCTYPE html>
- 1
- 4
- 1
- <b>
- My drawings
- a code editor
- 3
- as one space
- Yes
- Rain today
- in the body
- No
- in the head
- alt
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids