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 paragraphs does this code make?
<p>Our school trip</p>
<p>I love mangoes.</p>
<p>My best friend</p>
<h2>Cricket is fun.</h2>
<p>The red kite</p> - 2.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 3.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
- 4.True or false: a code editor turns HTML into a page. (a) True (b) False
- 5.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
-
6.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Fun facts</p> -->
<p>Hello, world!</p> (a) Hello, world! (b) The red kite (c) Fun facts - 7.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
8.🔗 Which words do you click on?
<a href="https://example.com">About us</a> (a) https://example.com (b) Contact us (c) About us (d) href - 9.📄 What is the first line of an HTML5 page? (a) <head> (b) <!DOCTYPE html> (c) <html> (d) <body>
- 10.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<body>”? (a) <!DOCTYPE html> (b) <body>
- 11.📄 Can HTML on its own make a form? (a) No (b) Yes
- 12.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
- 13.Which of these is a closing tag? (a) <li> (b) <h1> (c) <title> (d) </b>
-
14.🔗 Which words do you click on?
<a href="https://example.com">Maths fun</a> (a) https://example.com (b) Art corner (c) Maths fun (d) href - 15.📄 Can HTML on its own pick a random number? (a) No (b) Yes
-
16.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="250"> - 17.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h4> or <h3>? (a) <h6> (b) <h4> (c) <h3> (d) <h2>
- 18.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) HyperText (c) Hot Tags (d) High Tech
-
19.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue</p> -
20.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h4>Cricket is fun.</h4>
<h2>Rain today</h2>
<h4>I love mangoes.</h4> - 21.Which of these is true of a web browser? (a) has an address bar (b) hosts websites online (c) stores a website’s files (d) answers page requests
-
22.🔗 Which words do you click on?
<a href="quiz.html">About us</a> (a) Contact us (b) About us (c) href (d) quiz.html - 23.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
- 24.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <img> (d) <pic>
- 25.Which of these is an opening tag? (a) </title> (b) <li> (c) </p> (d) </body>
- 26.🏷️ Which is the closing tag for <small>? (a) <small> (b) </small> (c) <\small> (d) <small/>
-
27.🔍 Which line is missing its closing tag?
line 1: <small>The red kite
line 2: <i>Rain today</i>
line 3: <h2>Our school trip</h2> (a) line 1 (b) line 3 (c) line 2 - 28.🏷️ Which is the closing tag for <u>? (a) <u> (b) <\u> (c) <u/> (d) </u>
- 29.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) src (c) width (d) alt
-
30.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>Hello, world!</p>
<p>My pets</p>
<p>My best friend</p>
<!-- <p>The red kite</p> --> - 31.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h5>? (a) <h6> (b) <h2> (c) <h1> (d) <h5>
-
32.📋 What number does the browser show next to “Jamun”?
<ol start="3">
<li>Mango</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Orange</li>
</ol> -
33.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>Rain today</p>
<p>Hello, world!</p>
<h2>My pets</h2>
<p>Cricket is fun.</p> -
34.🔗 Which address opens when you click this link?
<a href="art.html">Art corner</a> (a) quiz.html (b) Art corner (c) art.html (d) news.html -
35.📋 What number does the browser show next to “Banana”?
<ol start="6">
<li>Litchi</li>
<li>Banana</li>
<li>Mango</li>
<li>Grapes</li>
<li>Guava</li>
</ol> - 36.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
37.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Fun facts</p>
<!-- <p>My best friend</p> -->
<p>Rain today</p> (a) Fun facts (b) Cricket is fun. (c) Rain today (d) My best friend - 38.🏷️ Which is the closing tag for <i>? (a) <i> (b) <i/> (c) <\i> (d) </i>
-
39.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>The red kite</p>
<h2>My best friend</h2> - 40.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h4>? (a) <h6> (b) <h4> (c) <h2> (d) <h5>
Answer key
- 4
- Yes
- in the body
- False
- href
- Fun facts
- a closing tag
- About us
- <!DOCTYPE html>
- <!DOCTYPE html>
- Yes
- 6
- </b>
- Maths fun
- No
- 250
- <h2>
- HyperText
- 2
- 4
- has an address bar
- About us
- -->
- <img>
- <li>
- </small>
- line 1
- </u>
- height
- 4
- <h1>
- 5
- 4
- art.html
- 7
- has a closing tag
- My best friend
- </i>
- 2
- <h6>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids