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.🔢 When you open a web page, which comes first: “you type the URL” or “the server sends files”? (a) the server sends files (b) you type the URL
- 2.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) ( (d) <
- 3.⚡ Which JavaScript word repeats code? (a) let (b) alert() (c) console.log() (d) for
-
4.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue<br>Rivers flow<br>Stars shine</p> -
5.🔗 Which address opens when you click this link?
<a href="quiz.html">Maths fun</a> (a) games.html (b) quiz.html (c) Maths fun (d) about.html - 6.True or false: p { color: red; } goes in script.js. (a) True (b) False
- 7.Which of these goes in the body? (a) <table> (b) <link rel="stylesheet"> (c) <meta charset="utf-8"> (d) <style>
- 8.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) height (d) width
- 9.💬 How does an HTML comment start? (a) <!-- (b) /* (c) // (d) #
- 10.🔍 Which is the odd one out? (a) saves our .html files (b) opens web pages for us (c) has an address bar (d) turns HTML into a page
- 11.✍️ In color: blue; which part is the value? (a) color (b) ; (c) : (d) blue
- 12.📝 What does <br> do? (a) makes text bold (b) makes a list (c) starts a new line (d) adds a picture
-
13.🎯 Which CSS selector matches this element?
<h2 class="note" id="hero">Hello</h2> (a) h2 (b) .hero (c) #note (d) .big - 14.True or false: a web server has an address bar. (a) False (b) True
-
15.⚡ What number does this code print?
let score = 16;
score = score + 11;
score = score - 1;
console.log(score); - 16.🎯 What kind of selector is .card? (a) an id selector (b) an element selector (c) a class selector
-
17.⚡ What number does this code print?
let apples = 6;
apples = apples + 11;
apples = apples - 5;
console.log(apples); -
18.⚡ What number does this code print?
let apples = 10;
apples = apples + 5;
apples = apples - 3;
console.log(apples); -
19.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 130px;
padding: 15px;
border: 1px solid black;
margin: 20px;
} - 20.True or false: “use headings in order” helps everyone use the page. (a) False (b) True
-
21.📱 The screen is 700px wide. Does the rule inside @media apply?
p {
font-size: 20px;
}
@media (max-width: 768px) {
p {
font-size: 16px;
}
} (a) No (b) Yes - 22.True or false: <title> goes in the body. (a) False (b) True
- 23.True or false: the content is the gap to other boxes. (a) False (b) True
- 24.🎯 What kind of selector is #main? (a) an element selector (b) a class selector (c) an id selector
-
25.✍️ Which property is set to italic in this rule?
h1 {
color: red;
padding: 8px;
font-style: italic;
} (a) color (b) font-style (c) italic (d) font-size - 26.True or false: <img src="cat.png"> goes in index.html. (a) True (b) False
- 27.True or false: <td> makes one data cell. (a) True (b) False
-
28.⚖️ What colour is the text of this element?
<h1 class="red" id="hero">Hi</h1>
CSS:
#hero { color: white; }
#hero { color: blue; } (a) black (b) yellow (c) white (d) blue - 29.🧭 Why use <nav> instead of <div> for a menu? (a) it tells its meaning (b) it loads faster (c) it makes text red (d) it adds pictures
- 30.🎯 Which element does the selector li style? (a) <div> (b) <p id="logo"> (c) <span class="box"> (d) <li class="box">
-
31.⚡ What number does this code print?
let a = 9;
let b = 4;
console.log(a - b); - 32.True or false: <h1> goes in the head. (a) True (b) False
- 33.🎯 Which sign starts an id selector? (a) # (b) @ (c) & (d) .
- 34.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) G (d) J
- 35.💪 Which flexbox property turns on flexbox? (a) align-items (b) display: flex (c) justify-content (d) gap
-
36.📱 The screen is 375px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (min-width: 600px) {
p {
font-size: 14px;
}
} (a) Yes (b) No - 37.Which colour pair is hard to read? (a) dark grey on white (b) black on white (c) white on black (d) red on green
- 38.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a hash # (d) a slash /
-
39.🔗 Where does this link open?
<a href="about.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab - 40.🌈 Which hex code is red? (a) #00ffff (b) #ff0000 (c) #ffffff (d) #00ff00
Answer key
- you type the URL
- <
- for
- 4
- quiz.html
- False
- <table>
- height
- <!--
- saves our .html files
- blue
- starts a new line
- h2
- False
- 26
- a class selector
- 12
- 12
- 202
- True
- Yes
- False
- False
- an id selector
- font-style
- True
- True
- blue
- it tells its meaning
- <li class="box">
- 5
- False
- #
- F
- display: flex
- No
- red on green
- a slash /
- in a new tab
- #ff0000
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids