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 show on the page?
<p>Rain today</p>
<p>My pets</p>
<p>Our school trip</p>
<!-- <p>Good morning!</p> --> - 2.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 6 (d) 1
- 3.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the title (d) the doctype
- 4.🖼️ Which attribute of <img> tells which image to load? (a) src (b) width (c) height (d) alt
- 5.True or false: a code editor answers page requests. (a) False (b) True
- 6.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <br> (d) <h1>
-
7.🔗 Which address opens when you click this link?
<a href="contact.html">School news</a> (a) https://example.com (b) maths.html (c) contact.html (d) School news - 8.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h3> (d) <h1>
- 9.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h2>? (a) <h2> (b) <h1> (c) <h4> (d) <h5>
-
10.🔗 Which words do you click on?
<a href="maths.html">Contact us</a> (a) maths.html (b) Contact us (c) Visit the site (d) href - 11.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
- 12.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Modern (c) Mouse (d) Markup
-
13.🔗 Which address opens when you click this link?
<a href="maths.html">Play games</a> (a) art.html (b) maths.html (c) Play games (d) news.html - 14.🔗 What does HyperText mean? (a) very big text (b) text in colour (c) secret text (d) text with links
-
15.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>Fun facts</p> -->
<p>Rain today</p> - 16.📄 Can HTML on its own keep a high score? (a) Yes (b) No
- 17.🌐 Which one colours code to help us? (a) a web browser (b) a web server (c) a code editor
-
18.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Our school trip</p>
<p>I love mangoes.</p>
<h2>Good morning!</h2>
<p>Hello, world!</p>
<p>Good morning!</p> - 19.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h5> or <h3>? (a) <h3> (b) <h6> (c) <h1> (d) <h5>
- 20.Which of these is true of a web server? (a) has an address bar (b) saves our .html files (c) turns HTML into a page (d) stores a website’s files
- 21.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h4> or <h1>? (a) <h4> (b) <h5> (c) <h6> (d) <h1>
- 22.Which of these goes in the head? (a) <a> (b) <h1> (c) <link rel="stylesheet"> (d) <ul>
-
23.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue<br>Kites fly high<br>Stars shine<br>Rivers flow</p> - 24.True or false: HTML on its own can pick a random number. (a) True (b) False
- 25.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 26.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) Home Text (c) Hot Tags (d) HyperText
-
27.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Mango</li>
<li>Litchi</li>
<li>Guava</li>
</ol> -
28.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="100"> (a) kite.png (b) A red kite (c) map.png (d) cake.jpg - 29.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h5> or <h3>? (a) <h2> (b) <h4> (c) <h5> (d) <h3>
- 30.📝 What does <br> do? (a) makes a list (b) starts a new line (c) makes text bold (d) adds a picture
- 31.True or false: <ul> goes in the head. (a) False (b) True
-
32.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) A tiger asleep (b) tiger.jpg (c) kite.png (d) map.png -
33.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="350"> - 34.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dollar $ (c) a hash # (d) a dot .
-
35.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="250"> (a) moon.png (b) bus.jpg (c) fort.jpg (d) The full moon -
36.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>My best friend</p>
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p>
<p>Cricket is fun.</p> -
37.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h3>The red kite</h3>
<p>Good morning!</p>
<p>I love mangoes.</p>
<p>Good morning!</p> -
38.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Rain today</p>
<h4>Rain today</h4> -
39.🔍 Which line is missing its closing tag?
line 1: <strong>Cricket is fun.</strong>
line 2: <h1>Good morning!
line 3: <small>Rain today</small> (a) line 3 (b) line 2 (c) line 1 -
40.🔍 One closing tag is missing. Which one?
<b>Our school trip</b>
<h3>Fun facts
<strong>Rain today</strong> (a) </b> (b) </strong> (c) </h2> (d) </h3>
Answer key
- 3
- 1
- the body
- src
- False
- <h1>
- contact.html
- <h6>
- <h1>
- Contact us
- Yes
- Markup
- maths.html
- text with links
- 1
- No
- a code editor
- 5
- <h1>
- stores a website’s files
- <h1>
- <link rel="stylesheet">
- 5
- False
- Yes
- HyperText
- 4
- kite.png
- <h2>
- starts a new line
- False
- tiger.jpg
- 350
- a slash /
- moon.png
- 4
- 2
- 2
- line 2
- </h3>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids