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 of these is a weak password? (a) Mango#Kite29! (b) 111111 (c) Blue@Tiger_74 (d) Rain#Drop_42!
-
2.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 4; i++) {
total = total + i;
}
console.log(total); -
3.🎯 Which CSS selector matches this element?
<span class="menu" id="hero">Hello</span> (a) p (b) #menu (c) .hero (d) .menu -
4.🎯 Which CSS selector matches this element?
<span class="note" id="end">Hello</span> (a) #hero (b) .end (c) span (d) #note -
5.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 8; i++) {
total = total + 2;
}
console.log(total); - 6.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) in a big heading (d) on the browser tab
-
7.🖌️ What colour is behind the letters?
li {
background-color: red;
font-size: 28px;
text-align: left;
color: purple;
} (a) purple (b) yellow (c) red - 8.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 9.⚡ What does alert() show? (a) a table (b) a new tab (c) a pop-up box (d) a picture
- 10.Which colour pair is hard to read? (a) dark grey on white (b) white on black (c) pink on red (d) white on dark blue
-
11.⚖️ What colour is the text of this element?
<p class="box" id="hero">Hi</p>
CSS:
p { color: orange; }
p { color: blue; } (a) purple (b) orange (c) red (d) blue - 12.🔢 To build and share your first web page, what comes right after “write the HTML”? (a) publish it online (b) plan what to show (c) test in a browser (d) add CSS styles
- 13.Which of these is an opening tag? (a) </li> (b) </h1> (c) </p> (d) <body>
-
14.🔗 Where does this link open?
<a href="games.html">Play games</a> (a) in a new tab (b) in the same tab -
15.🔁 What does this code print?
let temp = 6;
if (temp < 10) {
console.log("Hot");
} else {
console.log("Cool");
} (a) Hot (b) Cool -
16.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Our school trip</p>
<p>I love mangoes.</p>
<p>Cricket is fun.</p> -
17.📱 The screen is 1100px wide. Does the rule inside @media apply?
p {
font-size: 16px;
}
@media (min-width: 768px) {
p {
font-size: 24px;
}
} (a) Yes (b) No - 18.True or false: <ul> goes inside ul or ol. (a) False (b) True
-
19.📋 What number does the browser show next to “Banana”?
<ol start="8">
<li>Papaya</li>
<li>Jamun</li>
<li>Orange</li>
<li>Banana</li>
<li>Mango</li>
</ol> - 20.✍️ CSS declarations go inside which brackets? (a) < > (b) [ ] (c) ( ) (d) { }
- 21.True or false: the content is the line round the box. (a) True (b) False
- 22.True or false: HTTPS scrambles data on its way. (a) True (b) False
- 23.🔁 What does i++ do? (a) doubles i (b) takes 1 from i (c) prints i (d) adds 1 to i
- 24.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <pic> (d) <p>
- 25.🚀 Which file should this code go in: let score = 0; (a) style.css (b) script.js (c) index.html
- 26.📝 Which input type sends the form? (a) password (b) radio (c) checkbox (d) submit
- 27.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the later one (b) neither (c) the shorter one (d) the first one
- 28.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the body (d) the doctype
-
29.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="300"> (a) fort.jpg (b) width (c) A tiger asleep (d) An old fort - 30.📝 Which tag gives a form box a name you can click? (a) <hr> (b) <title> (c) <label> (d) <h1>
- 31.🎯 How many elements on a page should have the same id? (a) any number (b) 2 (c) 1 (d) 5
- 32.🌐 Which one answers page requests? (a) a code editor (b) a web server (c) a web browser
- 33.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 34.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <link about.html>
-
35.🔗 Which words do you click on?
<a href="contact.html">Take the quiz</a> (a) href (b) contact.html (c) Take the quiz (d) Play games -
36.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Planets</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) We won by 5 runs. (b) index.html (c) Space Facts (d) Planets -
37.🔁 How many times does this code print “Well done”?
for (let i = 2; i < 10; i++) {
console.log("Well done");
} -
38.🎯 Which CSS selector matches this element?
<li class="big" id="top">Hello</li> (a) .big (b) div (c) #intro (d) #big - 39.💬 How does an HTML comment end? (a) */ (b) // (c) --> (d) >>
- 40.🛡️ Should you share your password with your best friend? (a) Yes (b) No
Answer key
- 111111
- 10
- .menu
- span
- 16
- on the browser tab
- red
- an opening tag
- a pop-up box
- pink on red
- blue
- add CSS styles
- <body>
- in the same tab
- Hot
- 1
- Yes
- False
- 11
- { }
- False
- True
- adds 1 to i
- <img>
- script.js
- submit
- the later one
- the body
- An old fort
- <label>
- 1
- a web server
- an opening tag
- <a href="about.html">
- Take the quiz
- Space Facts
- 8
- .big
- -->
- No
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids