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.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) neither (c) the first one (d) the later one
- 2.True or false: HTML on its own can make links to pages. (a) True (b) False
- 3.🔠 How many heading levels does HTML have? (a) 6 (b) 10 (c) 3 (d) 4
- 4.🚀 Which tag loads script.js into a page? (a) <a href="script.js"> (b) <js src="script.js"> (c) <script src="script.js"> (d) <link script.js>
- 5.⚡ Which JavaScript word runs code when true? (a) console.log() (b) alert() (c) let (d) if
-
6.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Good morning!</p>
<p>My pets</p>
<h4>My best friend</h4>
<h4>Fun facts</h4> - 7.🔍 Which is the odd one out? (a) checks a quiz answer (b) counts down a timer (c) shows a pop-up message (d) makes headings and lists
- 8.🎯 Which sign starts a class selector? (a) & (b) # (c) . (d) @
- 9.Which of these is safe to do online? (a) download from pop-ups (b) ask before downloading (c) share your OTP (d) click prize links
-
10.🔁 How many times does this code print “Hello”?
for (let i = 2; i <= 8; i++) {
console.log("Hello");
} - 11.🌍 Which one shows the page to you? (a) the browser (b) HTTPS (c) the server (d) the URL
-
12.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
p {
font-size: 24px;
}
@media (max-width: 1024px) {
p {
font-size: 22px;
}
} -
13.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<p>Fun facts</p> (a) Hello, world! (b) Rain today (c) Fun facts - 14.True or false: HTML on its own can pick a random number. (a) False (b) True
-
15.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>All about me</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) index.html (c) Art Gallery (d) All about me - 16.🌗 Is white on black easy or hard to read? (a) easy to read (b) hard to read
- 17.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is fast (b) the data is scrambled (c) the site is free (d) the site is a game
- 18.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h5> or <h4>? (a) <h3> (b) <h4> (c) <h2> (d) <h5>
- 19.📊 Which tag makes one data cell? (a) <table> (b) <td> (c) <caption> (d) <th>
- 20.🔍 Which is the odd one out? (a) changes the page live (b) adds space around boxes (c) rounds box corners (d) lays out the page
- 21.🧭 Which semantic tag sits at the bottom? (a) <article> (b) <aside> (c) <nav> (d) <footer>
- 22.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to colour it (d) to describe the image
- 23.🔗 Which attribute holds the address of a link? (a) id (b) href (c) alt (d) src
- 24.Which of these has a closing tag? (a) <img> (b) <br> (c) <meta> (d) <li>
-
25.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 260px;
justify-content: flex-start;
}
Inside are 4 boxes, each 50px wide (no margins). - 26.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h4>? (a) <h4> (b) <h2> (c) <h1> (d) <h3>
- 27.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
- 28.True or false: <img src="cat.png"> goes in style.css. (a) False (b) True
- 29.🌈 Which colour is #000000? (a) red (b) cyan (c) magenta (d) black
- 30.🖌️ Which CSS property colours behind the text? (a) background-color (b) font-size (c) color (d) font-weight
-
31.⚖️ What colour is the text of this element?
<p class="big" id="hero">Hi</p>
CSS:
.big { color: green; }
p { color: red; } (a) green (b) white (c) orange (d) red - 32.🖌️ Which CSS property makes the text bold? (a) color (b) font-size (c) font-weight (d) text-align
-
33.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 190px;
justify-content: flex-start;
}
Inside are 3 boxes, each 40px wide (no margins). -
34.⚖️ What colour is the text of this element?
<p class="note" id="top">Hi</p>
CSS:
#top { color: white; }
p { color: black; } (a) green (b) white (c) black (d) orange -
35.🎯 Which CSS selector matches this element?
<p class="big" id="logo">Hello</p> (a) h1 (b) .big (c) #big (d) .logo - 36.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <html> (c) </head> (d) <!DOCTYPE html>
-
37.🔗 Where does this link open?
<a href="maths.html">Take the quiz</a> (a) in the same tab (b) in a new tab - 38.🎯 What kind of selector is .big? (a) a class selector (b) an element selector (c) an id selector
-
39.⚡ What does this code print? (Look at the quotes!)
let x = "9";
let y = 1;
console.log(x + y); (a) 10 (b) Error (c) 91 - 40.True or false: a code editor stores a website’s files. (a) False (b) True
Answer key
- the later one
- True
- 6
- <script src="script.js">
- if
- 3
- makes headings and lists
- .
- ask before downloading
- 7
- the browser
- 22
- Hello, world!
- False
- Art Gallery
- easy to read
- the data is scrambled
- <h5>
- <td>
- changes the page live
- <footer>
- to describe the image
- href
- <li>
- 60
- <h4>
- a web browser
- False
- black
- background-color
- green
- font-weight
- 70
- white
- .big
- <!DOCTYPE html>
- in the same tab
- a class selector
- 91
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids