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 many times does this code print “Welcome”?
for (let i = 3; i <= 8; i++) {
console.log("Welcome");
} -
2.⚡ What does this code print? (Look at the quotes!)
let x = "4";
let y = 7;
console.log(x + y); (a) Error (b) 11 (c) 47 -
3.✍️ Which property is set to yellow in this rule?
.box {
color: red;
margin: 10px;
background-color: yellow;
} (a) padding (b) background-color (c) yellow (d) margin - 4.🌍 Which one asks for a web page? (a) the server (b) the URL (c) HTTPS (d) the browser
-
5.⚖️ What colour is the text of this element?
<h2 class="note" id="intro">Hi</h2>
CSS:
#intro { color: green; }
#intro { color: yellow; } (a) black (b) orange (c) yellow (d) green - 6.True or false: CSS changes the page live. (a) True (b) False
- 7.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
- 8.What does justify-content: flex-end do? (a) packs boxes at the start (b) puts boxes in the middle (c) packs boxes at the end (d) equal gaps, none at ends
-
9.⚡ What does this code print? (Look at the quotes!)
let x = "6";
let y = 9;
console.log(x + y); (a) 15 (b) 69 (c) Error - 10.🔢 On a typical page, from top to bottom, which comes first: “<header>” or “<main>”? (a) <main> (b) <header>
-
11.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
p {
font-size: 24px;
}
@media (min-width: 600px) {
p {
font-size: 26px;
}
} -
12.🔗 Where does this link open?
<a href="contact.html" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab -
13.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 480px;
justify-content: center;
}
Inside are 4 boxes, each 80px wide (no margins). - 14.🔍 Which is the odd one out? (a) makes a form box (b) rounds box corners (c) makes headings and lists (d) gives the page structure
- 15.📊 Which tag makes one data cell? (a) <th> (b) <table> (c) <caption> (d) <td>
- 16.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h6>? (a) <h4> (b) <h2> (c) <h6> (d) <h1>
-
17.🔗 Which address opens when you click this link?
<a href="art.html">Visit the site</a> (a) quiz.html (b) news.html (c) art.html (d) Visit the site -
18.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Jamun</li>
</ul> - 19.🎯 Which element does the selector .menu style? (a) <p class="menu"> (b) <h1 class="big"> (c) <p id="menu"> (d) <p class="note">
- 20.⚡ Which JavaScript word writes in the console? (a) for (b) if (c) let (d) console.log()
- 21.🌈 Which colour of light is strongest in rgb(34, 191, 15)? (a) green (b) red (c) blue
-
22.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>My pets</p>
<h2>Fun facts</h2>
<p>My best friend</p>
<h2>Hello, world!</h2>
<h2>Fun facts</h2> - 23.🖌️ Which CSS property centres a heading? (a) color (b) text-align (c) font-family (d) background-color
- 24.🧭 Which semantic tag holds copyright notes? (a) <header> (b) <footer> (c) <nav> (d) <main>
- 25.True or false: HTML on its own cannot make headings. (a) False (b) True
-
26.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>I love mangoes.</p>
<!-- <p>Cricket is fun.</p> -->
<p>Our school trip</p> -
27.🖌️ What colour are the letters?
h1 {
color: yellow;
background-color: white;
text-align: center;
font-size: 20px;
} (a) white (b) yellow (c) blue - 28.🛡️ Online: is it safe to keep passwords secret? (a) not safe (b) safe
- 29.True or false: <main> holds the logo and title. (a) False (b) True
-
30.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="350"> (a) fort.jpg (b) A tiger asleep (c) width (d) An old fort - 31.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) editor (c) attribute (d) element
- 32.⚡ Which word makes a new variable? (a) make (b) put (c) give (d) let
- 33.🧭 Is <span> semantic or not semantic? (a) semantic (b) not semantic
-
34.🎯 Which CSS selector matches this element?
<h1 class="red" id="hero">Hello</h1> (a) .hero (b) #red (c) h2 (d) h1 -
35.📱 The screen is 820px wide. Does the rule inside @media apply?
p {
font-size: 24px;
}
@media (max-width: 600px) {
p {
font-size: 22px;
}
} (a) Yes (b) No - 36.True or false: <td> makes a heading cell. (a) False (b) True
-
37.✍️ How many declarations (property: value pairs) are in this rule?
p {
color: red;
text-align: center;
font-style: italic;
width: 300px;
} - 38.🎨 Which tag connects an outside CSS file? (a) <css> (b) <a> (c) <img> (d) <link>
- 39.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
- 40.🧭 How many <main> parts should a page have? (a) one (b) three (c) none (d) ten
Answer key
- 6
- 47
- background-color
- the browser
- yellow
- False
- red
- packs boxes at the end
- 69
- <header>
- 26
- in a new tab
- 80
- rounds box corners
- <td>
- <h1>
- art.html
- 2
- <p class="menu">
- console.log()
- green
- 3
- text-align
- <footer>
- False
- 2
- yellow
- safe
- False
- An old fort
- element
- let
- not semantic
- h1
- No
- False
- 4
- <link>
- <a>
- one
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids