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.True or false: a code editor opens web pages for us. (a) False (b) True
- 2.True or false: h1 { font-size: 32px; } goes in style.css. (a) True (b) False
- 3.🖌️ Which CSS property sets the letter colour? (a) font-size (b) color (c) background-color (d) text-align
- 4.Which of these does HTML do? (a) adds space around boxes (b) rounds box corners (c) sets colours and fonts (d) gives the page structure
- 5.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h3> or <h1>? (a) <h4> (b) <h3> (c) <h1> (d) <h6>
-
6.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red</p> - 7.🖼️ Which attribute of <img> names the picture file? (a) width (b) alt (c) height (d) src
- 8.🔍 Which is the odd one out? (a) saves our .html files (b) colours code to help us (c) is where we type code (d) opens web pages for us
-
9.🔠 How many headings are in this code?
<h1>My pets</h1>
<h3>My pets</h3>
<h2>Our school trip</h2> - 10.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ol> (d) <ul>
-
11.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 6; i++) {
total = total + 3;
}
console.log(total); - 12.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
- 13.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 14.True or false: “write clear link text” makes the page harder to use. (a) True (b) False
-
15.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Cricket is fun.</p>
<p>Fun facts</p> (a) I love mangoes. (b) Fun facts (c) Cricket is fun. -
16.✍️ Which property is set to 8px in this rule?
h1 {
padding: 8px;
margin: 10px;
font-weight: bold;
} (a) padding (b) 8px (c) font-weight (d) border -
17.🔗 Which address opens when you click this link?
<a href="contact.html">Art corner</a> (a) contact.html (b) https://example.com (c) Art corner (d) maths.html -
18.🔁 What does this code print?
let marks = 11;
if (marks >= 23) {
console.log("Pass");
} else {
console.log("Try again");
} (a) Pass (b) Try again - 19.📱 What does a media query check? (a) the battery level (b) the time of day (c) the screen width (d) the page title
-
20.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (min-width: 600px) {
p {
font-size: 16px;
}
} - 21.Which of these goes in the head? (a) <p> (b) <h1> (c) <ul> (d) <style>
- 22.💬 How does an HTML comment end? (a) --> (b) */ (c) >> (d) //
- 23.🎯 Which sign starts a class selector? (a) & (b) . (c) @ (d) #
- 24.⚡ What does JavaScript add to a web page? (a) the domain name (b) actions and changes (c) the page title (d) only colours
- 25.🚀 Which file should this code go in: body { margin: 0; } (a) style.css (b) index.html (c) script.js
- 26.True or false: CSS shows a pop-up message. (a) False (b) True
- 27.📝 What does <p> make? (a) a picture (b) a paragraph (c) a link (d) a table
- 28.🧭 Which semantic tag holds the menu of links? (a) <footer> (b) <nav> (c) <header> (d) <article>
- 29.🔢 To build and share your first web page, which comes first: “add CSS styles” or “test in a browser”? (a) add CSS styles (b) test in a browser
-
30.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
p {
font-size: 24px;
}
@media (max-width: 480px) {
p {
font-size: 20px;
}
} - 31.True or false: <ul> has a closing tag. (a) False (b) True
- 32.🌈 Which colour of light is strongest in rgb(37, 77, 244)? (a) red (b) blue (c) green
- 33.Which of these is a closing tag? (a) <b> (b) <h1> (c) </title> (d) <p>
-
34.📱 The screen is 1100px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (max-width: 768px) {
p {
font-size: 14px;
}
} -
35.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>I love mangoes.</p>
<h4>The red kite</h4> - 36.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) click it twice (b) close it, tell an adult (c) type the password (d) share it with friends
- 37.Which of these is the border? (a) the line round the box (b) space inside the border (c) the gap round content (d) the gap to other boxes
- 38.🌍 What finds the server for a domain name like example.com? (a) HTML (b) DNS (c) CSS (d) alt
- 39.💬 How does an HTML comment start? (a) # (b) // (c) <!-- (d) /*
-
40.🔁 How many times does this code print “Hi”?
for (let i = 1; i <= 9; i++) {
console.log("Hi");
}
Answer key
- False
- True
- color
- gives the page structure
- <h6>
- 2
- src
- opens web pages for us
- 3
- <li>
- 18
- a web browser
- a closing tag
- False
- I love mangoes.
- padding
- contact.html
- Try again
- the screen width
- 16
- <style>
- -->
- .
- actions and changes
- style.css
- False
- a paragraph
- <nav>
- add CSS styles
- 20
- True
- blue
- </title>
- 16
- 2
- close it, tell an adult
- the line round the box
- DNS
- <!--
- 9
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids