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 colours code to help us? (a) a code editor (b) a web browser (c) a web server
-
2.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>My best friend</p> -->
<p>Hello, world!</p> (a) Hello, world! (b) The red kite (c) My best friend -
3.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>My pets</p> -->
<!-- <p>Fun facts</p> --> - 4.True or false: in <img>, alt describes the picture. (a) True (b) False
-
5.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) A tiger asleep (b) width (c) tiger.jpg (d) A red kite - 6.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
- 7.🧱 HTML gives a web page its ___. (a) speed (b) structure (c) sound (d) colours
- 8.💾 A web page file usually ends with which extension? (a) .png (b) .mp3 (c) .txt (d) .html
- 9.True or false: HTML on its own can make links to pages. (a) True (b) False
- 10.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h1> or <h3>? (a) <h5> (b) <h2> (c) <h3> (d) <h1>
-
11.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>Cricket is fun.</p> -->
<p>My pets</p>
<!-- <p>Rain today</p> -->
<!-- <p>Hello, world!</p> --> -
12.🔗 Which words do you click on?
<a href="about.html">Take the quiz</a> (a) Play games (b) Take the quiz (c) about.html (d) href - 13.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 14.Which of these is true of a web browser? (a) is where we type code (b) has an address bar (c) shows line numbers (d) saves our .html files
-
15.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>Hello, world!</p> -->
<p>My pets</p> - 16.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h5>? (a) <h3> (b) <h1> (c) <h2> (d) <h5>
- 17.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
- 18.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) makes it bold (d) hides the link
- 19.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
20.🔗 Where does this link open?
<a href="art.html">Take the quiz</a> (a) in a new tab (b) in the same tab - 21.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to make links (d) to show pictures
-
22.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>I love mangoes.</p>
<!-- <p>My best friend</p> --> - 23.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
-
24.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<!-- <p>The red kite</p> --> -
25.🔗 Which address opens when you click this link?
<a href="maths.html">Visit the site</a> (a) Visit the site (b) art.html (c) news.html (d) maths.html -
26.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Kites fly high<br>Sky is blue</p> -
27.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>My best friend</p>
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p> (a) My best friend (b) I love mangoes. (c) Hello, world! (d) Good morning! -
28.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>Good morning!</p> -->
<p>My pets</p>
<p>Fun facts</p> -
29.🔗 Which words do you click on?
<a href="https://example.com">Art corner</a> (a) https://example.com (b) Art corner (c) School news (d) href - 30.True or false: HTML on its own cannot run a game loop. (a) False (b) True
-
31.📋 What number does the browser show next to “Orange”?
<ol>
<li>Guava</li>
<li>Orange</li>
<li>Mango</li>
<li>Jamun</li>
<li>Papaya</li>
</ol> -
32.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>I love mangoes.</p>
<p>Rain today</p>
<h2>My best friend</h2>
<h2>Hello, world!</h2> -
33.🔍 Which line is missing its closing tag?
line 1: <h3>Cricket is fun.</h3>
line 2: <p>My pets</p>
line 3: <h1>The red kite (a) line 2 (b) line 3 (c) line 1 - 34.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h5> or <h2>? (a) <h3> (b) <h4> (c) <h5> (d) <h2>
- 35.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h6> or <h4>? (a) <h5> (b) <h6> (c) <h4> (d) <h1>
- 36.Which of these is true of a web browser? (a) sends pages over the net (b) hosts websites online (c) turns HTML into a page (d) stores a website’s files
-
37.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>Our school trip</p>
<!-- <p>The red kite</p> -->
<p>Cricket is fun.</p> (a) Our school trip (b) Rain today (c) Cricket is fun. (d) The red kite - 38.🏷️ Which is the closing tag for <small>? (a) </small> (b) <\small> (c) <small/> (d) <small>
- 39.💬 How does an HTML comment end? (a) // (b) >> (c) --> (d) */
- 40.True or false: <p> has a closing tag. (a) True (b) False
Answer key
- a code editor
- My best friend
- 1
- True
- A tiger asleep
- <!DOCTYPE html>
- structure
- .html
- True
- <h1>
- 2
- Take the quiz
- has a closing tag
- has an address bar
- 1
- <h5>
- <ul>
- opens it in a new tab
- an opening tag
- in the same tab
- to leave notes
- 2
- <a href="about.html">
- 2
- maths.html
- 3
- I love mangoes.
- 2
- Art corner
- True
- 2
- 3
- line 3
- <h5>
- <h6>
- turns HTML into a page
- The red kite
- </small>
- -->
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids