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.✍️ How does a CSS comment start? (a) # (b) /* (c) <!-- (d) //
- 2.True or false: <img> has a closing tag. (a) False (b) True
-
3.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>My pets</p>
<p>Hello, world!</p>
<!-- <p>Good morning!</p> --> -
4.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 8; i++) {
total = total + 5;
}
console.log(total); -
5.🔗 Which words do you click on?
<a href="contact.html">About us</a> (a) contact.html (b) Contact us (c) href (d) About us - 6.Which of these is true of <nav>? (a) helps you move around (b) holds extra side notes (c) sits at the bottom (d) is the page’s key part
-
7.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Kites fly high<br>Rivers flow</p> - 8.🛡️ Should you share your password with your best friend? (a) Yes (b) No
- 9.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h3> or <h4>? (a) <h3> (b) <h6> (c) <h4> (d) <h5>
- 10.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
- 11.True or false: HTML on its own can make links to pages. (a) False (b) True
-
12.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 3; i++) {
total = total + i;
}
console.log(total); -
13.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="checkbox" name="sport"> Football
<input type="checkbox" name="sport"> Kabaddi
<input type="checkbox" name="sport"> Cricket
<input type="checkbox" name="sport"> Hockey
</form> -
14.🔍 Which line is missing its closing tag?
line 1: <h2>Hello, world!
line 2: <strong>Rain today</strong>
line 3: <i>The red kite</i> (a) line 2 (b) line 3 (c) line 1 -
15.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
p {
font-size: 24px;
}
@media (max-width: 480px) {
p {
font-size: 18px;
}
} -
16.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 160px;
justify-content: flex-start;
}
Inside are 3 boxes, each 50px wide (no margins). - 17.🔢 To build and share your first web page, which comes LAST? (a) write the HTML (b) test in a browser (c) publish it online (d) plan what to show
-
18.🎯 Which CSS selector matches this element?
<li class="big" id="top">Hello</li> (a) #big (b) #intro (c) .top (d) #top - 19.🎯 Which element does the selector .red style? (a) <p class="red"> (b) <p class="box"> (c) <h1 class="star"> (d) <p id="red">
- 20.♿ A part of the page is under a <h1> heading. Which tag should its sub-heading use? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
- 21.True or false: JavaScript makes headings and lists. (a) True (b) False
-
22.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 270px;
padding: 30px;
border: 3px solid black;
margin: 0px;
} -
23.⚡ What does this code show?
let name = "Meera";
console.log("Hello, " + name + "!"); (a) Hello, name! (b) Hello, Meera! (c) name (d) Meera - 24.🏷️ Which is the closing tag for <p>? (a) <p> (b) </p> (c) <p/> (d) <\p>
- 25.⚡ Which word makes a new variable? (a) make (b) give (c) put (d) let
- 26.Which of these is an opening tag? (a) <li> (b) </body> (c) </b> (d) </title>
-
27.⚡ What number does this code print?
let a = 40;
let b = 40;
console.log(a - b); -
28.⚡ What does this code print? (Look at the quotes!)
let x = "6";
let y = 5;
console.log(x + y); (a) 11 (b) Error (c) 65 - 29.⚡ Which JavaScript word runs code when true? (a) for (b) alert() (c) if (d) let
- 30.Which of these is safe to do online? (a) use a nickname in games (b) download from pop-ups (c) click prize links (d) share your OTP
- 31.Which of these is not safe to do online? (a) share your password (b) ask before downloading (c) keep passwords secret (d) check for https first
-
32.📱 The screen is 540px wide. Does the rule inside @media apply?
p {
font-size: 20px;
}
@media (max-width: 768px) {
p {
font-size: 14px;
}
} (a) Yes (b) No - 33.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) element (d) address
-
34.🖌️ What colour is behind the letters?
li {
font-size: 28px;
background-color: white;
color: black;
text-align: left;
} (a) black (b) green (c) white - 35.Which colour pair is hard to read? (a) light grey on white (b) dark grey on white (c) yellow on black (d) black on white
-
36.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 370px;
justify-content: flex-start;
}
Inside are 4 boxes, each 80px wide (no margins). -
37.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Papaya</li>
<li>Mango</li>
</ul> - 38.Which of these is margin? (a) the gap to other boxes (b) the text or picture (c) space inside the border (d) the line round the box
- 39.True or false: <title> has a closing tag. (a) False (b) True
- 40.Which of these is a strong password? (a) riya2014 (b) 123456 (c) password (d) Mango#Kite29!
Answer key
- /*
- False
- 2
- 40
- About us
- helps you move around
- 3
- No
- <h6>
- a web server
- True
- 6
- 4
- line 1
- 24
- 10
- publish it online
- #top
- <p class="red">
- <h2>
- False
- 336
- Hello, Meera!
- </p>
- let
- <li>
- 0
- 65
- if
- use a nickname in games
- share your password
- Yes
- element
- white
- light grey on white
- 50
- 3
- the gap to other boxes
- True
- Mango#Kite29!
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids