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.🛡️ Online: is it safe to use a strong password? (a) not safe (b) safe
- 2.⚡ Which tag holds JavaScript in a page? (a) <script> (b) <js> (c) <code> (d) <style>
-
3.🔁 What does this code print?
let temp = 2;
if (temp >= 9) {
console.log("Hot");
} else {
console.log("Cool");
} (a) Cool (b) Hot - 4.True or false: in <img>, height tells which image to load. (a) False (b) True
- 5.📝 Which input type picks a day? (a) checkbox (b) password (c) submit (d) date
- 6.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>
-
7.⚖️ What colour is the text of this element?
<p class="box" id="logo">Hi</p>
CSS:
.box { color: blue; }
.box { color: green; } (a) green (b) yellow (c) orange (d) blue -
8.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue<br>Rivers flow<br>Roses are red<br>Birds sing</p> - 9.True or false: #top { color: blue; } goes in script.js. (a) False (b) True
-
10.🔍 Which line is missing its closing tag?
line 1: <small>My best friend</small>
line 2: <em>The red kite
line 3: <b>Our school trip</b> (a) line 3 (b) line 2 (c) line 1 - 11.🔢 To build and share your first web page, what comes right after “plan what to show”? (a) add CSS styles (b) publish it online (c) write the HTML (d) test in a browser
- 12.✍️ Which sign ends each CSS declaration? (a) , (b) ; (c) . (d) :
- 13.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 14.🧭 Why use <nav> instead of <div> for a menu? (a) it makes text red (b) it adds pictures (c) it tells its meaning (d) it loads faster
-
15.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 4; i++) {
total = total + 3;
}
console.log(total); - 16.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
-
17.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (max-width: 1024px) {
p {
font-size: 10px;
}
} - 18.🖌️ Which CSS property sets the letter colour? (a) text-align (b) color (c) font-weight (d) background-color
- 19.Which of these is not safe to do online? (a) keep passwords secret (b) use a strong password (c) check for https first (d) click prize links
- 20.Which of these is true of <article>? (a) holds a news story (b) helps you move around (c) holds extra side notes (d) holds copyright notes
-
21.✍️ What is the selector in this CSS rule?
p {
font-size: 20px;
font-style: italic;
} (a) .note (b) italic (c) font-size (d) p -
22.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="radio" name="sport"> Kabaddi
<input type="radio" name="sport"> Chess
<input type="radio" name="sport"> Cricket
</form> - 23.📱 max-width: 600px applies when the screen is ___. (a) exactly 1000px (b) turned off (c) 600px or narrower (d) 600px or wider
- 24.🌐 Which one hosts websites online? (a) a code editor (b) a web server (c) a web browser
- 25.Which of these does CSS do? (a) changes the text size (b) puts a picture on a page (c) gives the page structure (d) shows a pop-up message
-
26.🎯 Which CSS selector matches this element?
<p class="menu" id="main">Hello</p> (a) p (b) .note (c) .main (d) #menu - 27.True or false: <td> makes one table row. (a) False (b) True
- 28.📝 What does a password box show instead of letters? (a) capital letters (b) numbers (c) emojis (d) dots
-
29.⚖️ What colour is the text of this element?
<p class="big" id="hero">Hi</p>
CSS:
#hero { color: green; }
#hero { color: white; } (a) yellow (b) white (c) green (d) black - 30.🌈 Which colour of light is strongest in rgb(113, 194, 14)? (a) blue (b) green (c) red
-
31.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 370px;
justify-content: flex-end;
}
Inside are 3 boxes, each 100px wide (no margins). -
32.🌍 What is the protocol in this URL?
https://school.example.in/games/chess.html (a) https (b) school.example.in (c) http (d) /games/chess.html -
33.🖌️ What colour is behind the letters?
p {
text-align: center;
color: blue;
font-size: 12px;
background-color: orange;
} (a) blue (b) green (c) orange - 34.True or false: to use a strong password is not safe. (a) True (b) False
- 35.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to add colour (d) to show pictures
- 36.True or false: in <img>, src is read by screen readers. (a) False (b) True
-
37.⚡ What number does this code print?
let a = 50;
let b = 24;
console.log(a - b); - 38.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 39.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <\h2> (c) </h2> (d) <h2/>
- 40.Which of these is margin? (a) the line round the box (b) the gap round content (c) the text or picture (d) the gap to other boxes
Answer key
- safe
- <script>
- Cool
- False
- date
- <ol>
- green
- 5
- False
- line 2
- write the HTML
- ;
- a closing tag
- it tells its meaning
- 12
- False
- 10
- color
- click prize links
- holds a news story
- p
- 1
- 600px or narrower
- a web server
- changes the text size
- p
- False
- dots
- white
- green
- 70
- https
- orange
- False
- to leave notes
- False
- 26
- No
- </h2>
- the gap to other boxes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids