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 web server? (a) hosts websites online (b) shows pages from the web (c) turns HTML into a page (d) opens web pages for us
- 2.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
- 3.🔍 Which is the odd one out? (a) stores a website’s files (b) shows line numbers (c) hosts websites online (d) sends pages over the net
- 4.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h3> or <h1>? (a) <h1> (b) <h3> (c) <h5> (d) <h2>
- 5.Which of these is true of a code editor? (a) answers page requests (b) colours code to help us (c) shows pages from the web (d) opens web pages for us
- 6.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
7.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Mango</li>
<li>Papaya</li>
<li>Grapes</li>
</ol> - 8.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dollar $ (d) a dot .
-
9.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>My pets</p> -->
<p>Good morning!</p> - 10.True or false: <a> goes in the body. (a) True (b) False
- 11.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
- 12.True or false: <li> is an ordered list. (a) True (b) False
-
13.🔍 Which line is missing its closing tag?
line 1: <u>Cricket is fun.
line 2: <i>Rain today</i>
line 3: <strong>My pets</strong> (a) line 2 (b) line 1 (c) line 3 - 14.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 15.True or false: a code editor is where we type code. (a) False (b) True
- 16.True or false: in <img>, height is read by screen readers. (a) True (b) False
-
17.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>Our school trip</p>
<p>Good morning!</p>
<p>The red kite</p>
<p>I love mangoes.</p> - 18.Which of these is a closing tag? (a) <h1> (b) </p> (c) <p> (d) <body>
- 19.🔍 Which is the odd one out? (a) saves our .html files (b) shows line numbers (c) is where we type code (d) stores a website’s files
-
20.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) kite.png (b) A tiger asleep (c) map.png (d) tiger.jpg - 21.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 22.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
- 23.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 24.Which of these is true of a web server? (a) saves our .html files (b) turns HTML into a page (c) stores a website’s files (d) colours code to help us
- 25.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h3> or <h4>? (a) <h3> (b) <h1> (c) <h4> (d) <h5>
-
26.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="150"> - 27.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
-
28.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="50"> (a) moon.png (b) dog.jpg (c) cake.jpg (d) Birthday cake -
29.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h2>Fun facts</h2>
<h3>Cricket is fun.</h3>
<p>Fun facts</p> - 30.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
- 31.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 32.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
-
33.🔍 One closing tag is missing. Which one?
<p>Fun facts</p>
<h1>Our school trip</h1>
<h2>My pets (a) </h2> (b) </p> (c) </strong> (d) </h1> - 34.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 6 (d) 4
-
35.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="300"> (a) An old fort (b) fort.jpg (c) width (d) A tiger asleep - 36.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h5> or <h6>? (a) <h2> (b) <h5> (c) <h4> (d) <h6>
- 37.📛 In <a href="x.html">, what is href? (a) an attribute (b) a closing tag (c) a comment (d) an element name
- 38.📄 Can HTML on its own make links to pages? (a) No (b) Yes
- 39.True or false: a web server answers page requests. (a) False (b) True
- 40.🏷️ HTML marks up text using ___. (a) pixels (b) wires (c) tags (d) keys
Answer key
- hosts websites online
- in the head
- shows line numbers
- <h1>
- colours code to help us
- Yes
- 4
- a slash /
- 1
- True
- True
- False
- line 1
- No
- True
- False
- 1
- </p>
- stores a website’s files
- tiger.jpg
- an opening tag
- in the body
- has a closing tag
- stores a website’s files
- <h5>
- 150
- <a href="about.html">
- cake.jpg
- 3
- a code editor
- Yes
- <ol>
- </h2>
- 6
- An old fort
- <h6>
- an attribute
- Yes
- True
- tags
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids