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 property is set to 8px in this rule?
li {
padding: 8px;
color: red;
border: 2px solid;
} (a) 8px (b) border (c) font-weight (d) padding - 2.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
-
3.🔁 What does this code print?
let age = 2;
if (age < 11) {
console.log("teen");
} else {
console.log("child");
} (a) teen (b) child -
4.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Orange</li>
</ul> (a) numbers (b) bullets -
5.⚡ What number does this code print?
let apples = 7;
apples = apples + 6;
apples = apples - 2;
console.log(apples); -
6.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>All about me</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Riya’s Recipes (b) body (c) We won by 5 runs. (d) All about me - 7.✍️ How does a CSS comment start? (a) // (b) <!-- (c) # (d) /*
-
8.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 500px;
justify-content: space-between;
}
Inside are 4 boxes, each 80px wide (no margins). -
9.✍️ How many declarations (property: value pairs) are in this rule?
h2 {
font-size: 20px;
} - 10.Which of these does HTML do? (a) counts down a timer (b) changes the page live (c) reacts to a button click (d) makes headings and lists
- 11.🎨 Which tag holds CSS inside the head? (a) <css> (b) <script> (c) <body> (d) <style>
- 12.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
- 13.🛡️ Is it safe to use the same password on every site? (a) No (b) Yes
- 14.🧩 Which language gives the page structure? (a) JavaScript (b) CSS (c) HTML
- 15.Which of these is true of <footer>? (a) holds the logo and title (b) holds extra side notes (c) holds copyright notes (d) sits at the very top
- 16.📝 Which input type picks a day? (a) submit (b) date (c) checkbox (d) number
- 17.🌗 Is light grey on white easy or hard to read? (a) hard to read (b) easy to read
- 18.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h2> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h6>
-
19.✍️ How many declarations (property: value pairs) are in this rule?
li {
font-style: italic;
text-align: center;
color: red;
margin: 10px;
} - 20.Which of these goes in the body? (a) <style> (b) <meta charset="utf-8"> (c) <title> (d) <h1>
- 21.⚡ Which JavaScript word makes a new variable? (a) for (b) let (c) alert() (d) if
- 22.🌗 Is black on white easy or hard to read? (a) hard to read (b) easy to read
-
23.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Sky is blue<br>Stars shine</p> - 24.🧭 Which semantic tag sits at the very top? (a) <header> (b) <article> (c) <footer> (d) <nav>
-
25.✍️ Which property is set to italic in this rule?
body {
text-align: center;
font-style: italic;
} (a) italic (b) font-size (c) font-style (d) color - 26.🌈 Which hex code is blue? (a) #00ff00 (b) #ff00ff (c) #0000ff (d) #ffff00
-
27.🔗 Which words do you click on?
<a href="about.html">School news</a> (a) Take the quiz (b) href (c) School news (d) about.html -
28.📝 How many <input> tags are in this form?
<form>
<input type="date">
<input type="email">
<input type="number">
<input type="password">
<input type="text">
<input type="submit" value="Send">
</form> -
29.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 8; i++) {
total = total + i;
}
console.log(total); - 30.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <p> (d) <pic>
-
31.🔁 How many times does this code print “Hi”?
for (let i = 1; i <= 4; i++) {
console.log("Hi");
} -
32.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="300"> (a) A red kite (b) width (c) A tiger asleep (d) tiger.jpg -
33.🎯 Which CSS selector matches this element?
<div class="big" id="hero">Hello</div> (a) span (b) .red (c) #top (d) .big - 34.🌈 Which colour of light is strongest in rgb(113, 239, 23)? (a) green (b) blue (c) red
- 35.True or false: the border is the gap round content. (a) False (b) True
- 36.🖌️ Which CSS property makes the text bold? (a) color (b) font-weight (c) text-align (d) font-size
-
37.🖌️ How big is the text, in px?
h2 {
text-align: center;
font-size: 20px;
background-color: black;
color: orange;
} - 38.What does justify-content: space-between do? (a) packs boxes at the start (b) equal gaps, none at ends (c) puts boxes in the middle (d) packs boxes at the end
- 39.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) editor (d) element
- 40.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <head> (d) <body>
Answer key
- padding
- <ul>
- teen
- bullets
- 11
- All about me
- /*
- 60
- 1
- makes headings and lists
- <style>
- in the head
- No
- HTML
- holds copyright notes
- date
- hard to read
- <h6>
- 4
- <h1>
- let
- easy to read
- 3
- <header>
- font-style
- #0000ff
- School news
- 6
- 36
- <img>
- 4
- A tiger asleep
- .big
- green
- False
- font-weight
- 20
- equal gaps, none at ends
- element
- <!DOCTYPE html>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids