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 one shows line numbers? (a) a code editor (b) a web server (c) a web browser
- 2.Which of these is true of a web browser? (a) hosts websites online (b) sends pages over the net (c) saves our .html files (d) shows pages from the web
-
3.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p> - 4.🌐 Which one shows pages from the web? (a) a web browser (b) a code editor (c) a web server
- 5.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) width (d) height
- 6.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as 5 spaces (c) as a dot (d) as one space
- 7.🔍 Which is the odd one out? (a) has an address bar (b) sends pages over the net (c) shows pages from the web (d) opens web pages for us
-
8.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> -->
<!-- <p>Hello, world!</p> --> -
9.🔍 One closing tag is missing. Which one?
<p>My pets</p>
<b>Rain today</b>
<h2>Fun facts (a) </b> (b) </p> (c) </h2> (d) </h1> - 10.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a comment (d) a closing tag
- 11.📋 Which tag goes around each item of a list? (a) <li> (b) <ul> (c) <ol> (d) <p>
-
12.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) width (b) dog.jpg (c) The full moon (d) A happy dog - 13.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h5> or <h6>? (a) <h2> (b) <h5> (c) <h3> (d) <h6>
-
14.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine<br>Birds sing<br>Sky is blue</p> -
15.🔍 Which line is missing its closing tag?
line 1: <u>Fun facts</u>
line 2: <p>My pets
line 3: <small>I love mangoes.</small> (a) line 1 (b) line 3 (c) line 2 - 16.True or false: <ol> is one item of a list. (a) False (b) True
- 17.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h4>? (a) <h4> (b) <h6> (c) <h2> (d) <h5>
- 18.📄 Can HTML on its own make a form? (a) Yes (b) No
- 19.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
- 20.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the head (d) the body
- 21.Which of these is true of a web server? (a) colours code to help us (b) stores a website’s files (c) has an address bar (d) opens web pages for us
- 22.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to show pictures (d) to leave notes
- 23.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) makes it blank (d) hides the link
-
24.🔍 One closing tag is missing. Which one?
<u>I love mangoes.</u>
<p>Cricket is fun.</p>
<h1>Our school trip (a) </h3> (b) </h1> (c) </p> (d) </u> -
25.🔍 Which line is missing its closing tag?
line 1: <p>Cricket is fun.</p>
line 2: <em>I love mangoes.</em>
line 3: <h1>Hello, world! (a) line 2 (b) line 1 (c) line 3 - 26.Which of these is an empty tag? (a) <p> (b) <li> (c) <hr> (d) <title>
-
27.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Papaya</li>
</ul> (a) numbers (b) bullets - 28.Which of these is a closing tag? (a) <h1> (b) <body> (c) </li> (d) <title>
-
29.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> -->
<p>My pets</p>
<!-- <p>Fun facts</p> --> - 30.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
31.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Rivers flow</p> - 32.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h2> or <h1>? (a) <h6> (b) <h1> (c) <h2> (d) <h3>
-
33.🔗 Where does this link open?
<a href="maths.html">Maths fun</a> (a) in the same tab (b) in a new tab - 34.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h4> or <h1>? (a) <h4> (b) <h3> (c) <h5> (d) <h1>
- 35.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to colour it (d) to load it faster
- 36.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h4>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
- 37.💾 A web page file usually ends with which extension? (a) .txt (b) .png (c) .html (d) .mp3
-
38.🔗 Which words do you click on?
<a href="about.html">Visit the site</a> (a) href (b) about.html (c) Visit the site (d) Maths fun - 39.True or false: <br> is an empty tag. (a) True (b) False
- 40.Which of these is an opening tag? (a) </b> (b) </h1> (c) <h1> (d) </title>
Answer key
- a code editor
- shows pages from the web
- 1
- a web browser
- alt
- as one space
- sends pages over the net
- 1
- </h2>
- an attribute
- <li>
- A happy dog
- <h6>
- 4
- line 2
- False
- <h2>
- Yes
- href
- the body
- stores a website’s files
- to leave notes
- opens it in a new tab
- </h1>
- line 3
- <hr>
- bullets
- </li>
- 2
- an empty tag
- 2
- <h1>
- in the same tab
- <h5>
- to describe the image
- <h1>
- .html
- Visit the site
- True
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids