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 file should this code go in: <p>Hello!</p> (a) script.js (b) index.html (c) style.css
- 2.What does justify-content: space-between do? (a) puts boxes in the middle (b) packs boxes at the start (c) packs boxes at the end (d) equal gaps, none at ends
- 3.🔁 What does i++ do? (a) takes 1 from i (b) doubles i (c) prints i (d) adds 1 to i
-
4.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (max-width: 768px) {
p {
font-size: 6px;
}
} -
5.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Match report</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) Riya’s Recipes (c) Match report (d) index.html - 6.📝 What does a password box show instead of letters? (a) emojis (b) numbers (c) capital letters (d) dots
- 7.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h3> or <h2>? (a) <h5> (b) <h3> (c) <h6> (d) <h2>
-
8.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="radio" name="fruit"> Banana
<input type="radio" name="fruit"> Papaya
<input type="radio" name="fruit"> Mango
</form> - 9.💪 Which flexbox property picks row or column? (a) flex-direction (b) gap (c) justify-content (d) align-items
- 10.True or false: CSS makes a link. (a) True (b) False
- 11.True or false: #top is an id selector. (a) True (b) False
-
12.✍️ Which property is set to yellow in this rule?
h2 {
font-weight: bold;
margin: 10px;
background-color: yellow;
} (a) margin (b) yellow (c) padding (d) background-color - 13.⚖️ Which selector is the weakest? (a) a class selector (b) an id selector (c) an element selector
-
14.🔗 Which words do you click on?
<a href="maths.html">School news</a> (a) School news (b) href (c) Take the quiz (d) maths.html - 15.🛡️ Online: is it safe to share your password? (a) not safe (b) safe
- 16.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 3 (d) 10
- 17.🖌️ Which CSS property centres a heading? (a) background-color (b) font-family (c) text-align (d) color
- 18.⚡ Which JavaScript word repeats code? (a) alert() (b) console.log() (c) let (d) for
- 19.📝 Which input type is for one line of words? (a) number (b) submit (c) text (d) radio
- 20.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
- 21.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
22.⚡ What number does this code print?
let score = 8;
score = score + 4;
score = score - 3;
console.log(score); - 23.What does background-color do? (a) colours behind the text (b) makes letters bigger (c) picks the font style (d) sets the letter colour
- 24.📊 Which tag makes one table row? (a) <th> (b) <table> (c) <tr> (d) <caption>
- 25.What is <input type="text"> for? (a) is for an email address (b) lets you pick only one (c) sends the form (d) is for one line of words
- 26.True or false: in <img>, alt sets how tall it is. (a) True (b) False
- 27.🌗 Is light grey on white easy or hard to read? (a) easy to read (b) hard to read
-
28.⚖️ What colour is the text of this element?
<p class="big" id="end">Hi</p>
CSS:
.big { color: green; }
.big { color: red; } (a) yellow (b) green (c) red (d) purple - 29.📄 Which part holds everything you see on the page? (a) the body (b) the title (c) the doctype (d) the head
-
30.🔍 Which line is missing its closing tag?
line 1: <i>Rain today</i>
line 2: <strong>I love mangoes.</strong>
line 3: <h3>Hello, world! (a) line 2 (b) line 1 (c) line 3 - 31.🧩 Which language checks a quiz answer? (a) CSS (b) JavaScript (c) HTML
- 32.✍️ In color: blue; which part is the property? (a) color (b) ; (c) blue (d) :
- 33.What does text-align do? (a) makes letters bigger (b) picks the font style (c) sets the letter colour (d) centres a heading
- 34.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <img> (d) <pic>
- 35.🌈 Which colour is #00ff00? (a) magenta (b) blue (c) black (d) bright green
- 36.✍️ How does a CSS comment start? (a) // (b) # (c) <!-- (d) /*
- 37.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as 5 spaces (c) as a dot (d) as one space
-
38.🎯 Which CSS selector matches this element?
<span class="star" id="logo">Hello</span> (a) .logo (b) .menu (c) #star (d) #logo - 39.🧩 Which language counts down a timer? (a) HTML (b) JavaScript (c) CSS
- 40.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
Answer key
- index.html
- equal gaps, none at ends
- adds 1 to i
- 12
- Riya’s Recipes
- dots
- <h6>
- 1
- flex-direction
- False
- True
- background-color
- an element selector
- School news
- not safe
- 1
- text-align
- for
- text
- blue
- No
- 9
- colours behind the text
- <tr>
- is for one line of words
- False
- hard to read
- red
- the body
- line 3
- JavaScript
- color
- centres a heading
- <img>
- bright green
- /*
- as one space
- #logo
- JavaScript
- has a closing tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids