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.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Kites fly high</p> - 2.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
- 3.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) width (d) alt
- 4.True or false: HTML on its own can make headings. (a) True (b) False
-
5.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Banana</li>
<li>Litchi</li>
</ol> (a) bullets (b) numbers - 6.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
-
7.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h4>The red kite</h4>
<p>The red kite</p> - 8.🔍 Which is the odd one out? (a) turns HTML into a page (b) is where we type code (c) opens web pages for us (d) shows pages from the web
-
9.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>Cricket is fun.</p>
<p>My best friend</p>
<!-- <p>Good morning!</p> --> - 10.🌐 Which one sends pages over the net? (a) a web browser (b) a code editor (c) a web server
- 11.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <p> (d) <h6>
-
12.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>My pets</h2>
<p>My best friend</p> - 13.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <p> (d) <img>
-
14.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>Fun facts</p> -->
<p>My best friend</p> (a) Rain today (b) My best friend (c) Fun facts -
15.📋 What number does the browser show next to “Jamun”?
<ol start="5">
<li>Litchi</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Mango</li>
<li>Papaya</li>
<li>Guava</li>
</ol> - 16.🏷️ Which is the closing tag for <p>? (a) <p/> (b) </p> (c) <\p> (d) <p>
- 17.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as a new line (d) as one space
- 18.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
19.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>My pets</p>
<p>Hello, world!</p> (a) Hello, world! (b) My pets (c) My best friend - 20.True or false: <input> is an empty tag. (a) True (b) False
-
21.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Sky is blue<br>Kites fly high<br>Birds sing</p> - 22.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
23.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h2>I love mangoes.</h2>
<p>The red kite</p>
<h2>Our school trip</h2>
<h3>My best friend</h3> - 24.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
25.🔗 Which address opens when you click this link?
<a href="maths.html">Visit the site</a> (a) Visit the site (b) maths.html (c) news.html (d) art.html - 26.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a src="about.html">
- 27.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h1> or <h5>? (a) <h4> (b) <h2> (c) <h5> (d) <h1>
-
28.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Our school trip</p>
<h4>Rain today</h4>
<h2>Our school trip</h2>
<p>Fun facts</p> - 29.True or false: in <img>, src names the picture file. (a) True (b) False
- 30.True or false: a code editor has an address bar. (a) True (b) False
-
31.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>The red kite</p>
<p>Cricket is fun.</p> - 32.True or false: in <img>, src tells which image to load. (a) False (b) True
- 33.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
34.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>Rain today</p> -->
<p>My best friend</p>
<p>Hello, world!</p> - 35.True or false: in <img>, alt tells which image to load. (a) True (b) False
- 36.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 37.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) alt (d) src
-
38.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Orange</li>
<li>Litchi</li>
</ul> (a) bullets (b) numbers -
39.🔗 Which words do you click on?
<a href="https://example.com">Take the quiz</a> (a) Play games (b) href (c) Take the quiz (d) https://example.com -
40.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Fun facts</p>
<p>My pets</p> (a) Fun facts (b) My pets (c) My best friend
Answer key
- 2
- opens it in a new tab
- alt
- True
- numbers
- a web browser
- 2
- is where we type code
- 3
- a web server
- <h6>
- 2
- <a>
- Fun facts
- 6
- </p>
- as one space
- Yes
- My best friend
- True
- 4
- an opening tag
- 4
- a closing tag
- maths.html
- <a href="about.html">
- <h5>
- 3
- True
- False
- 1
- True
- has a closing tag
- 2
- False
- has a closing tag
- src
- bullets
- Take the quiz
- My best friend
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids