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.🏷️ HTML marks up text using ___. (a) wires (b) tags (c) pixels (d) keys
- 2.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) height (d) src
-
3.🔠 How many headings are in this code?
<h1>My pets</h1>
<h2>The red kite</h2>
<p>Rain today</p>
<h4>Fun facts</h4> - 4.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h5> or <h2>? (a) <h2> (b) <h5> (c) <h3> (d) <h1>
- 5.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
- 6.Which of these is an opening tag? (a) </body> (b) </li> (c) <title> (d) </p>
- 7.📝 What does <p> make? (a) a table (b) a link (c) a paragraph (d) a picture
-
8.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Litchi</li>
<li>Grapes</li>
</ol> (a) numbers (b) bullets -
9.🔗 Which words do you click on?
<a href="art.html">School news</a> (a) School news (b) href (c) art.html (d) Take the quiz -
10.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="150"> (a) moon.png (b) Birthday cake (c) cake.jpg (d) dog.jpg - 11.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) shows line numbers (d) has an address bar
- 12.Which of these has a closing tag? (a) <input> (b) <title> (c) <br> (d) <hr>
-
13.📋 Does this list show bullets or numbers?
<ol>
<li>Litchi</li>
<li>Jamun</li>
</ol> (a) bullets (b) numbers -
14.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Papaya</li>
</ol> (a) numbers (b) bullets -
15.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Cricket is fun.</p>
<p>My pets</p>
<p>I love mangoes.</p>
<h2>Cricket is fun.</h2> -
16.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="300"> -
17.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="300"> (a) width (b) Map of India (c) Birthday cake (d) map.png - 18.📝 What does <br> do? (a) starts a new line (b) makes text bold (c) makes a list (d) adds a picture
- 19.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a alt="about.html">
- 20.🏷️ Which is the closing tag for <u>? (a) <\u> (b) <u/> (c) </u> (d) <u>
- 21.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) stores a website’s files (d) turns HTML into a page
-
22.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>The red kite</p>
<!-- <p>My pets</p> -->
<p>Fun facts</p> (a) Good morning! (b) The red kite (c) Fun facts (d) My pets -
23.🔍 Which line is missing its closing tag?
line 1: <h1>Good morning!</h1>
line 2: <strong>Cricket is fun.</strong>
line 3: <p>My pets (a) line 1 (b) line 2 (c) line 3 - 24.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <body> (d) <head>
-
25.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>My pets</p>
<!-- <p>Fun facts</p> --> (a) Good morning! (b) Fun facts (c) My pets - 26.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
- 27.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
- 28.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) attribute (d) element
-
29.🔗 Which words do you click on?
<a href="https://example.com">Play games</a> (a) href (b) Play games (c) https://example.com (d) About us - 30.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
31.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>Rain today</p> -->
<p>Fun facts</p>
<p>I love mangoes.</p> -
32.📋 What number does the browser show next to “Orange”?
<ol start="2">
<li>Jamun</li>
<li>Orange</li>
<li>Banana</li>
<li>Grapes</li>
<li>Guava</li>
<li>Litchi</li>
</ol> - 33.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
34.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Fun facts</p>
<p>Hello, world!</p>
<p>Good morning!</p>
<p>My pets</p> - 35.True or false: in <img>, width tells which image to load. (a) False (b) True
- 36.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
- 37.True or false: in <img>, alt names the picture file. (a) True (b) False
- 38.Which of these is true of a web browser? (a) saves our .html files (b) hosts websites online (c) has an address bar (d) is where we type code
- 39.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 40.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
Answer key
- tags
- src
- 3
- <h5>
- a web browser
- <title>
- a paragraph
- numbers
- School news
- cake.jpg
- shows line numbers
- <title>
- numbers
- numbers
- 4
- 300
- Map of India
- starts a new line
- <a href="about.html">
- </u>
- stores a website’s files
- My pets
- line 3
- <!DOCTYPE html>
- Fun facts
- <ul>
- <a>
- element
- Play games
- a closing tag
- 3
- 3
- Yes
- 1
- False
- <ol>
- False
- has an address bar
- has a closing tag
- <ol>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids