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.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="350"> - 2.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <h6> (d) <p>
- 3.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dot . (c) a hash # (d) a dollar $
- 4.True or false: in <img>, src sets how wide it is. (a) False (b) True
- 5.True or false: a web server colours code to help us. (a) True (b) False
- 6.True or false: <ul> goes in the body. (a) True (b) False
-
7.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>My best friend</p>
<p>Good morning!</p>
<!-- <p>I love mangoes.</p> --> (a) I love mangoes. (b) My best friend (c) Good morning! (d) My pets - 8.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h6> or <h2>? (a) <h6> (b) <h5> (c) <h2> (d) <h4>
-
9.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>Good morning!</p>
<p>Cricket is fun.</p>
<!-- <p>The red kite</p> -->
<!-- <p>My pets</p> --> - 10.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <head> (c) </html> (d) </body>
- 11.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h1>
- 12.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
13.🔍 One closing tag is missing. Which one?
<strong>Fun facts</strong>
<small>Good morning!
<h2>My pets</h2> (a) </h2> (b) </strong> (c) </h3> (d) </small> -
14.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Orange</li>
<li>Banana</li>
</ul> -
15.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Fun facts</p>
<p>Fun facts</p> -
16.🔗 Which words do you click on?
<a href="about.html">Maths fun</a> (a) about.html (b) href (c) Maths fun (d) Art corner - 17.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <a> (d) <img>
- 18.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
19.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Fun facts</p>
<!-- <p>Rain today</p> -->
<p>My pets</p>
<p>Our school trip</p> - 20.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
-
21.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Cricket is fun.</p>
<h2>Fun facts</h2>
<p>Hello, world!</p> - 22.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h5>? (a) <h2> (b) <h1> (c) <h5> (d) <h6>
- 23.Which of these goes in the head? (a) <ul> (b) <link rel="stylesheet"> (c) <a> (d) <table>
- 24.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
25.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p> (a) I love mangoes. (b) Hello, world! (c) Fun facts -
26.🔍 One closing tag is missing. Which one?
<u>Hello, world!</u>
<i>I love mangoes.</i>
<strong>Cricket is fun. (a) </strong> (b) </i> (c) </b> (d) </u> -
27.🔍 Which line is missing its closing tag?
line 1: <p>I love mangoes.</p>
line 2: <em>Cricket is fun.
line 3: <strong>Fun facts</strong> (a) line 3 (b) line 1 (c) line 2 -
28.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Mango</li>
<li>Papaya</li>
</ul> (a) bullets (b) numbers -
29.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>My best friend</p> -->
<p>Rain today</p> (a) My best friend (b) Our school trip (c) Rain today - 30.Which of these is a closing tag? (a) <body> (b) </li> (c) <title> (d) <h1>
- 31.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
-
32.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="50"> (a) moon.png (b) bus.jpg (c) The full moon (d) fort.jpg - 33.🏷️ Which is the closing tag for <b>? (a) <b> (b) <\b> (c) </b> (d) <b/>
- 34.Which of these is true of a code editor? (a) shows pages from the web (b) is where we type code (c) hosts websites online (d) sends pages over the net
-
35.🔍 Which line is missing its closing tag?
line 1: <p>The red kite
line 2: <strong>My best friend</strong>
line 3: <b>Fun facts</b> (a) line 2 (b) line 1 (c) line 3 - 36.True or false: a web browser shows pages from the web. (a) False (b) True
- 37.🌐 Which one colours code to help us? (a) a code editor (b) a web server (c) a web browser
-
38.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Good morning!</p>
<p>I love mangoes.</p> - 39.Which of these is an opening tag? (a) </h1> (b) </body> (c) <title> (d) </p>
-
40.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Stars shine<br>Roses are red<br>Kites fly high<br>Sky is blue</p>
Answer key
- 350
- <h1>
- a slash /
- False
- False
- True
- I love mangoes.
- <h2>
- 3
- </html>
- <h1>
- an opening tag
- </small>
- 3
- 3
- Maths fun
- <img>
- Yes
- 3
- <ul>
- 2
- <h1>
- <link rel="stylesheet">
- an opening tag
- I love mangoes.
- </strong>
- line 2
- bullets
- My best friend
- </li>
- in the body
- moon.png
- </b>
- is where we type code
- line 1
- True
- a code editor
- 1
- <title>
- 5
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids