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 safe to do online? (a) click prize links (b) share your OTP (c) put secrets in comments (d) check for https first
- 2.True or false: <li> is an empty tag. (a) True (b) False
- 3.True or false: console.log(5 + 2); goes in style.css. (a) True (b) False
- 4.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
5.⚡ What does this code show?
let name = "Kabir";
console.log("Hello, " + name + "!"); (a) Hello, Kabir! (b) Kabir (c) Hello, name! (d) name - 6.📝 Which tag makes a big box for many lines of text? (a) <br> (b) <textarea> (c) <input> (d) <p>
- 7.True or false: alert(score); goes in script.js. (a) True (b) False
-
8.🔁 What does this code print?
let temp = 32;
if (temp >= 6) {
console.log("Hot");
} else {
console.log("Cool");
} (a) Hot (b) Cool - 9.🖌️ Which CSS property picks the font style? (a) font-family (b) color (c) background-color (d) font-size
- 10.🌈 Which colour of light is strongest in rgb(1, 220, 40)? (a) green (b) red (c) blue
-
11.🔍 One closing tag is missing. Which one?
<strong>Rain today</strong>
<h1>My best friend
<h2>I love mangoes.</h2> (a) </strong> (b) </em> (c) </h1> (d) </h2> -
12.🎯 Which CSS selector matches this element?
<h2 class="star" id="intro">Hello</h2> (a) .menu (b) li (c) #intro (d) #star - 13.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h3> or <h4>? (a) <h3> (b) <h1> (c) <h4> (d) <h6>
- 14.True or false: HTML adds space around boxes. (a) False (b) True
-
15.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="radio" name="sport"> Chess
<input type="radio" name="sport"> Football
<input type="radio" name="sport"> Cricket
<input type="radio" name="sport"> Kabaddi
<input type="radio" name="sport"> Hockey
</form> -
16.🔁 What does this code print?
let age = 27;
if (age > 43) {
console.log("teen");
} else {
console.log("child");
} (a) teen (b) child -
17.⚡ What does this code print? (Look at the quotes!)
let x = "3";
let y = 6;
console.log(x + y); (a) Error (b) 9 (c) 36 - 18.Which colour pair is easy to read? (a) light grey on white (b) red on green (c) pink on red (d) dark grey on white
- 19.True or false: <hr> has a closing tag. (a) True (b) False
- 20.🖌️ Which CSS property makes the text bold? (a) font-family (b) text-align (c) font-weight (d) background-color
- 21.🎯 Which element does the selector h2 style? (a) <h2 class="note"> (b) <li> (c) <div class="note"> (d) <span id="logo">
- 22.🔢 On a typical page, from top to bottom, what comes right after “<nav>”? (a) <header> (b) <main> (c) <footer>
-
23.🌍 What is the protocol in this URL?
https://kids.example.org/art/gallery.html (a) kids.example.org (b) /art/gallery.html (c) http (d) https - 24.💬 Does the browser show comments on the page? (a) No (b) Yes
- 25.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h1>? (a) <h3> (b) <h6> (c) <h2> (d) <h1>
-
26.🔁 How many times does this code print “Welcome”?
for (let i = 2; i < 10; i++) {
console.log("Welcome");
} - 27.Which of these is an opening tag? (a) </b> (b) </body> (c) <b> (d) </title>
- 28.True or false: <h1> goes in the body. (a) True (b) False
- 29.🌈 Which colour of light is strongest in rgb(33, 57, 234)? (a) red (b) blue (c) green
- 30.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 31.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <table> (c) <style> (d) <title>
-
32.⚡ What number does this code print?
let a = 35;
let b = 1;
console.log(a - b); -
33.✍️ What value is given to font-style in this rule?
h1 {
text-align: center;
border: 2px solid;
margin: 10px;
font-style: italic;
} (a) font-style (b) red (c) italic (d) 20px - 34.🚀 What is the home page file of a website usually called? (a) home.css (b) start.js (c) main.png (d) index.html
-
35.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 200px;
padding: 30px;
border: 1px solid black;
margin: 20px;
} -
36.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>I like to read.</p>
</body>
</html> (a) index.html (b) Easy snacks (c) Riya’s Recipes (d) I like to read. - 37.True or false: the server is the page’s address. (a) True (b) False
- 38.True or false: JavaScript changes the page live. (a) False (b) True
- 39.Which of these is true of <nav>? (a) holds the main content (b) helps you move around (c) holds one blog post (d) holds the logo and title
- 40.True or false: the border is the text or picture. (a) True (b) False
Answer key
- check for https first
- False
- False
- Yes
- Hello, Kabir!
- <textarea>
- True
- Hot
- font-family
- green
- </h1>
- #intro
- <h6>
- False
- 1
- child
- 36
- dark grey on white
- False
- font-weight
- <h2 class="note">
- <main>
- https
- No
- <h1>
- 8
- <b>
- True
- blue
- No
- <table>
- 34
- italic
- index.html
- 262
- Riya’s Recipes
- False
- True
- helps you move around
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids