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.💾 A web page file usually ends with which extension? (a) .html (b) .mp3 (c) .txt (d) .png
- 2.Which of these is true of a web server? (a) colours code to help us (b) turns HTML into a page (c) is where we type code (d) answers page requests
-
3.🔗 Which words do you click on?
<a href="quiz.html">Visit the site</a> (a) quiz.html (b) Maths fun (c) href (d) Visit the site - 4.🔢 In a basic web page file, which comes first: “</html>” or “<!DOCTYPE html>”? (a) </html> (b) <!DOCTYPE html>
-
5.🔍 Which line is missing its closing tag?
line 1: <h2>Our school trip</h2>
line 2: <b>Good morning!</b>
line 3: <h1>The red kite (a) line 1 (b) line 3 (c) line 2 - 6.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
-
7.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Play games</a> (a) in a new tab (b) in the same tab -
8.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Kites fly high<br>Birds sing<br>Stars shine</p> -
9.🔍 Which line is missing its closing tag?
line 1: <u>Rain today
line 2: <p>Cricket is fun.</p>
line 3: <h3>My best friend</h3> (a) line 2 (b) line 3 (c) line 1 -
10.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>Good morning!</p>
<!-- <p>Rain today</p> -->
<!-- <p>My best friend</p> --> - 11.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h4> or <h6>? (a) <h6> (b) <h1> (c) <h4> (d) <h2>
-
12.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Papaya</li>
<li>Guava</li>
</ol> (a) numbers (b) bullets - 13.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 14.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) height (c) width (d) src
- 15.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 16.True or false: a code editor is where we type code. (a) False (b) True
- 17.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) src (c) width (d) height
- 18.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
19.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Good morning!</p> -->
<p>Fun facts</p>
<p>I love mangoes.</p> (a) I love mangoes. (b) Hello, world! (c) Fun facts (d) Good morning! -
20.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>I love mangoes.</p>
<!-- <p>Cricket is fun.</p> --> (a) Cricket is fun. (b) My pets (c) I love mangoes. - 21.True or false: <img> has a closing tag. (a) True (b) False
- 22.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to make links (d) to show pictures
-
23.🔗 Where does this link open?
<a href="maths.html">Maths fun</a> (a) in the same tab (b) in a new tab - 24.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 25.🔗 Which attribute holds the address of a link? (a) id (b) href (c) src (d) alt
- 26.📝 What does <br> do? (a) starts a new line (b) adds a picture (c) makes text bold (d) makes a list
- 27.📝 What does <hr> draw? (a) a table (b) a link (c) a picture (d) a line across the page
-
28.📋 Does this list show bullets or numbers?
<ol>
<li>Litchi</li>
<li>Jamun</li>
<li>Guava</li>
</ol> (a) bullets (b) numbers - 29.True or false: HTML on its own can make tables. (a) True (b) False
-
30.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<p>Hello, world!</p> (a) My pets (b) Hello, world! (c) I love mangoes. - 31.💬 Does the browser show comments on the page? (a) No (b) Yes
-
32.🔗 Which words do you click on?
<a href="games.html">School news</a> (a) games.html (b) Take the quiz (c) School news (d) href - 33.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 10 (c) 6 (d) 3
- 34.True or false: <img> is an empty tag. (a) False (b) True
-
35.🔗 Which address opens when you click this link?
<a href="art.html">Visit the site</a> (a) quiz.html (b) art.html (c) Visit the site (d) news.html - 36.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <br> (d) <ul>
- 37.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 38.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h6> (c) <p> (d) <h1>
-
39.🔗 Which address opens when you click this link?
<a href="maths.html">Visit the site</a> (a) art.html (b) Visit the site (c) news.html (d) maths.html -
40.🔗 Which words do you click on?
<a href="maths.html">Take the quiz</a> (a) href (b) Play games (c) Take the quiz (d) maths.html
Answer key
- .html
- answers page requests
- Visit the site
- <!DOCTYPE html>
- line 3
- a web browser
- in a new tab
- 4
- line 1
- 1
- <h1>
- numbers
- Yes
- src
- a closing tag
- True
- alt
- an opening tag
- Good morning!
- Cricket is fun.
- False
- to leave notes
- in the same tab
- an empty tag
- href
- starts a new line
- a line across the page
- numbers
- True
- My pets
- No
- School news
- 1
- True
- art.html
- <ul>
- an opening tag
- <h1>
- maths.html
- Take the quiz
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids