Web Development Worksheet: Final Test
Code tip (Read it like a browser): Find the topic: HTML, CSS, JavaScript or how the web works. Read the code line by line, the way a browser would. For sums and loops, write each step down and check it again.
NameDateTime takenScore ___ / 40
-
1.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>My best friend</p>
<p>Cricket is fun.</p>
<!-- <p>Fun facts</p> --> (a) My pets (b) Cricket is fun. (c) Fun facts (d) My best friend -
2.🖌️ What colour are the letters?
p {
font-size: 40px;
text-align: right;
background-color: orange;
color: yellow;
} (a) white (b) yellow (c) orange - 3.True or false: the server stores the site’s files. (a) False (b) True
-
4.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
p {
font-size: 24px;
}
@media (min-width: 480px) {
p {
font-size: 26px;
}
} -
5.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Rivers flow</p> -
6.⚖️ What colour is the text of this element?
<h1 class="note" id="top">Hi</h1>
CSS:
h1 { color: white; }
h1 { color: blue; } (a) blue (b) orange (c) black (d) white -
7.📊 How many cells are in each row?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
<tr><td>Guava</td><td>Jamun</td><td>Jamun</td><td>Orange</td></tr>
<tr><td>Papaya</td><td>Jamun</td><td>Orange</td><td>Banana</td></tr>
</table> - 8.🔁 What does i++ do? (a) prints i (b) takes 1 from i (c) doubles i (d) adds 1 to i
- 9.What does text-align do? (a) picks the font style (b) makes the text bold (c) makes letters bigger (d) centres a heading
- 10.♿ Does this help everyone, or make the page harder to use: add alt text to images? (a) makes it harder (b) helps everyone
- 11.📝 What does <br> do? (a) makes text bold (b) makes a list (c) starts a new line (d) adds a picture
-
12.🔗 Which words do you click on?
<a href="about.html">Take the quiz</a> (a) href (b) Take the quiz (c) Play games (d) about.html - 13.🖌️ Which CSS property colours behind the text? (a) background-color (b) font-weight (c) text-align (d) font-size
-
14.♿ Is this heading order correct (no level skipped)?
<h1> → <h2> → <h3> → <h4> (a) No (b) Yes - 15.True or false: <p> is an empty tag. (a) False (b) True
-
16.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 5; i++) {
total = total + 3;
}
console.log(total); -
17.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>The red kite</p> -->
<p>Good morning!</p>
<p>My best friend</p> - 18.Which of these does HTML do? (a) shows a pop-up message (b) lays out the page (c) rounds box corners (d) makes a form box
- 19.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
- 20.⚖️ Which selector is the weakest? (a) an id selector (b) a class selector (c) an element selector
- 21.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h6> (c) <h1> (d) <p>
- 22.🔤 In “HTML”, what does the L stand for? (a) Language (b) Laptop (c) Link (d) Line
- 23.🎯 What kind of selector is p? (a) an id selector (b) an element selector (c) a class selector
-
24.🔗 Where does this link open?
<a href="https://example.com" target="_blank">About us</a> (a) in a new tab (b) in the same tab - 25.True or false: <input type="email"> is for an email address. (a) True (b) False
- 26.🚀 Which file should this code go in: alert(score); (a) style.css (b) index.html (c) script.js
- 27.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dollar $ (d) a dot .
- 28.True or false: <ul> goes in the head. (a) False (b) True
-
29.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>Our school trip</h2>
<h2>The red kite</h2> - 30.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
31.🖌️ How big is the text, in px?
h1 {
text-align: right;
font-size: 28px;
color: yellow;
background-color: purple;
} - 32.Which of these does HTML do? (a) adds space around boxes (b) shows a pop-up message (c) puts a picture on a page (d) changes the page live
- 33.🧭 Who is helped most by semantic tags? (a) screen-reader users (b) only the printer (c) only the server (d) nobody
-
34.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>The red kite</p>
<h3>Hello, world!</h3>
<p>My best friend</p> -
35.🖌️ What colour is behind the letters?
li {
font-size: 16px;
background-color: white;
color: black;
text-align: left;
} (a) black (b) white (c) purple - 36.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 37.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 38.Which of these is an opening tag? (a) </p> (b) <p> (c) </b> (d) </title>
-
39.📱 The screen is 414px wide. Does the rule inside @media apply?
p {
font-size: 20px;
}
@media (max-width: 480px) {
p {
font-size: 14px;
}
} (a) Yes (b) No -
40.⚡ What does this code print? (Look at the quotes!)
let x = "8";
let y = 5;
console.log(x + y); (a) 13 (b) 85 (c) Error
Answer key
- Fun facts
- yellow
- True
- 24
- 2
- blue
- 4
- adds 1 to i
- centres a heading
- helps everyone
- starts a new line
- Take the quiz
- background-color
- Yes
- False
- 15
- 3
- makes a form box
- 1
- an element selector
- <h1>
- Language
- an element selector
- in a new tab
- True
- script.js
- a slash /
- False
- 1
- has a closing tag
- 28
- puts a picture on a page
- screen-reader users
- 2
- white
- Yes
- in the head
- <p>
- Yes
- 85
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids