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 of these is true of a code editor? (a) has an address bar (b) shows line numbers (c) opens web pages for us (d) stores a website’s files
-
2.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Fun facts</p>
<p>Fun facts</p>
<p>Our school trip</p>
<p>Hello, world!</p>
<h2>The red kite</h2> - 3.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
- 4.📝 What does <br> do? (a) makes a list (b) makes text bold (c) starts a new line (d) adds a picture
- 5.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
-
6.🔗 Which words do you click on?
<a href="news.html">Play games</a> (a) news.html (b) href (c) About us (d) Play games -
7.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow<br>Sky is blue</p> - 8.True or false: HTML on its own can make headings. (a) True (b) False
- 9.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <html> (d) <head>
- 10.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) </html> (c) </body> (d) <!DOCTYPE html>
- 11.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the doctype (d) the body
-
12.🔗 Where does this link open?
<a href="https://example.com">Art corner</a> (a) in the same tab (b) in a new tab - 13.💾 A web page file usually ends with which extension? (a) .txt (b) .mp3 (c) .html (d) .png
- 14.True or false: in <img>, width sets how tall it is. (a) False (b) True
- 15.True or false: HTML on its own can add pictures to a page. (a) False (b) True
-
16.🔍 One closing tag is missing. Which one?
<h2>My pets</h2>
<i>Hello, world!
<u>Fun facts</u> (a) </h1> (b) </h2> (c) </u> (d) </i> -
17.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>The red kite</p>
<p>My pets</p>
<p>My best friend</p>
<!-- <p>Cricket is fun.</p> --> -
18.🔗 Where does this link open?
<a href="art.html">Visit the site</a> (a) in the same tab (b) in a new tab - 19.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
- 20.True or false: HTML on its own can make bullet lists. (a) True (b) False
-
21.🔗 Which words do you click on?
<a href="games.html">School news</a> (a) games.html (b) href (c) Take the quiz (d) School news -
22.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>The red kite</p>
<!-- <p>Good morning!</p> -->
<p>Our school trip</p> -
23.📋 What number does the browser show next to “Banana”?
<ol start="6">
<li>Grapes</li>
<li>Banana</li>
<li>Orange</li>
<li>Litchi</li>
<li>Papaya</li>
</ol> -
24.🔍 Which line is missing its closing tag?
line 1: <h1>Hello, world!</h1>
line 2: <small>My best friend</small>
line 3: <b>The red kite (a) line 1 (b) line 3 (c) line 2 - 25.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
26.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Papaya</li>
</ol> -
27.🔗 Which words do you click on?
<a href="art.html">Art corner</a> (a) href (b) Art corner (c) art.html (d) School news - 28.True or false: <h1> has a closing tag. (a) False (b) True
-
29.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>I like to read.</p>
</body>
</html> (a) body (b) My Hobbies (c) Easy snacks (d) I like to read. -
30.🔠 How many headings are in this code?
<h1>My pets</h1>
<h2>Good morning!</h2>
<p>Hello, world!</p> - 31.Which of these has a closing tag? (a) <img> (b) <hr> (c) <br> (d) <ul>
- 32.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <p> (d) <h1>
- 33.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h5>? (a) <h3> (b) <h1> (c) <h2> (d) <h5>
- 34.🏷️ Which is the closing tag for <i>? (a) <\i> (b) </i> (c) <i/> (d) <i>
- 35.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h5> or <h1>? (a) <h6> (b) <h5> (c) <h3> (d) <h1>
- 36.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a dollar $ (d) a hash #
- 37.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) opens web pages for us (d) saves our .html files
- 38.🏷️ Which is the closing tag for <p>? (a) <p/> (b) </p> (c) <\p> (d) <p>
- 39.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h6>? (a) <h5> (b) <h3> (c) <h6> (d) <h2>
- 40.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
Answer key
- shows line numbers
- 5
- a web browser
- starts a new line
- Yes
- Play games
- 3
- True
- <!DOCTYPE html>
- <!DOCTYPE html>
- the body
- in the same tab
- .html
- False
- True
- </i>
- 4
- in the same tab
- <ul>
- True
- School news
- 3
- 7
- line 3
- a closing tag
- 4
- Art corner
- True
- Easy snacks
- 2
- <ul>
- <h6>
- <h5>
- </i>
- <h6>
- a slash /
- opens web pages for us
- </p>
- <h6>
- an opening tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids