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.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="350"> (a) A red kite (b) Map of India (c) width (d) kite.png -
2.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="400"> (a) A happy dog (b) moon.png (c) dog.jpg (d) bus.jpg - 3.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h4>? (a) <h2> (b) <h5> (c) <h6> (d) <h4>
- 4.💬 Does the browser show comments on the page? (a) Yes (b) No
-
5.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>Our school trip</h2>
<h2>The red kite</h2> -
6.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Mango</li>
<li>Papaya</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Orange</li>
</ol> -
7.🔗 Which words do you click on?
<a href="maths.html">Maths fun</a> (a) maths.html (b) href (c) Art corner (d) Maths fun - 8.🏷️ Which is the closing tag for <b>? (a) </b> (b) <\b> (c) <b> (d) <b/>
- 9.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
- 10.True or false: a code editor hosts websites online. (a) True (b) False
- 11.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a slash / (d) a dot .
- 12.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h1> or <h3>? (a) <h3> (b) <h5> (c) <h1> (d) <h6>
- 13.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h3> or <h6>? (a) <h3> (b) <h6> (c) <h4> (d) <h1>
- 14.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
-
15.📋 What number does the browser show next to “Orange”?
<ol>
<li>Grapes</li>
<li>Orange</li>
<li>Jamun</li>
</ol> -
16.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Orange</li>
</ul> (a) bullets (b) numbers -
17.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<p>The red kite</p>
<p>Our school trip</p> - 18.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) width (d) alt
- 19.Which of these is true of a code editor? (a) answers page requests (b) turns HTML into a page (c) opens web pages for us (d) saves our .html files
- 20.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <link about.html>
- 21.Which of these is true of a web browser? (a) shows line numbers (b) hosts websites online (c) has an address bar (d) is where we type code
- 22.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h2> (b) <h3> (c) <h1> (d) <h6>
-
23.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Litchi</li>
</ul> (a) numbers (b) bullets - 24.Which of these is an opening tag? (a) </li> (b) </title> (c) <p> (d) </h1>
- 25.True or false: <ul> goes in the body. (a) False (b) True
- 26.📄 Can HTML on its own run a game loop? (a) Yes (b) No
- 27.Which of these is a closing tag? (a) <li> (b) </p> (c) <body> (d) <p>
- 28.Which of these is true of a code editor? (a) turns HTML into a page (b) shows line numbers (c) stores a website’s files (d) shows pages from the web
-
29.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>Rain today</p>
<p>Fun facts</p>
<h2>Rain today</h2>
<h2>My pets</h2>
<p>My best friend</p> -
30.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p> (a) Hello, world! (b) Fun facts (c) I love mangoes. - 31.True or false: <title> goes in the head. (a) False (b) True
- 32.🔗 What does target="_blank" do to a link? (a) makes it bold (b) hides the link (c) makes it blank (d) opens it in a new tab
-
33.🔗 Which address opens when you click this link?
<a href="news.html">School news</a> (a) games.html (b) news.html (c) quiz.html (d) School news - 34.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h2> or <h1>? (a) <h2> (b) <h5> (c) <h1> (d) <h3>
- 35.📄 Can HTML on its own pick a random number? (a) Yes (b) No
-
36.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h3>Our school trip</h3>
<h2>Fun facts</h2>
<p>Good morning!</p>
<h2>The red kite</h2> - 37.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h2> or <h6>? (a) <h6> (b) <h4> (c) <h2> (d) <h3>
-
38.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Roses are red</p> - 39.Which of these is an opening tag? (a) </li> (b) </p> (c) </title> (d) <body>
- 40.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <link> (d) <img>
Answer key
- A red kite
- dog.jpg
- <h2>
- No
- 1
- 3
- Maths fun
- </b>
- in the body
- False
- a slash /
- <h1>
- <h1>
- No
- 2
- bullets
- 3
- width
- saves our .html files
- <a href="about.html">
- has an address bar
- <h1>
- bullets
- <p>
- True
- No
- </p>
- shows line numbers
- 4
- Hello, world!
- True
- opens it in a new tab
- news.html
- <h1>
- No
- 4
- <h2>
- 2
- <body>
- <a>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids