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 sign ends each CSS declaration? (a) ; (b) : (c) . (d) ,
-
2.📊 How many cells does this table have in all?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
<tr><td>Litchi</td><td>Orange</td><td>Guava</td><td>Guava</td></tr>
</table> - 3.🔐 Is abcd1234 a strong or a weak password? (a) strong (b) weak
-
4.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Match report</h1>
<p>Mars is red.</p>
</body>
</html> (a) Match report (b) index.html (c) Mars is red. (d) My Hobbies - 5.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
- 6.🧭 Is <main> semantic or not semantic? (a) not semantic (b) semantic
- 7.📱 max-width: 600px applies when the screen is ___. (a) 600px or narrower (b) 600px or wider (c) turned off (d) exactly 1000px
- 8.💬 How does an HTML comment end? (a) // (b) */ (c) >> (d) -->
- 9.💪 Which justify-content value packs boxes at the start? (a) flex-start (b) space-between (c) flex-end (d) center
- 10.True or false: margin is the gap round content. (a) True (b) False
-
11.🔁 What does this code print?
let temp = 2;
if (temp >= 15) {
console.log("Hot");
} else {
console.log("Cool");
} (a) Cool (b) Hot - 12.🛡️ Online: is it safe to think before you post? (a) safe (b) not safe
- 13.🔍 Which is the odd one out? (a) changes the text size (b) lays out the page (c) rounds box corners (d) checks a quiz answer
-
14.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>The red kite</p> -->
<p>Fun facts</p> (a) Fun facts (b) The red kite (c) Hello, world! - 15.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) the first one (c) the later one (d) neither
- 16.🎯 Which element does the selector li style? (a) <div> (b) <span class="menu"> (c) <li class="menu"> (d) <p id="main">
-
17.🔗 Which address opens when you click this link?
<a href="news.html">School news</a> (a) quiz.html (b) School news (c) news.html (d) games.html -
18.🎯 Which CSS selector matches this element?
<h1 class="menu" id="top">Hello</h1> (a) .top (b) h2 (c) h1 (d) #intro -
19.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>My best friend</h2>
<h2>Hello, world!</h2>
<h2>My pets</h2> - 20.Which of these is padding? (a) the gap round content (b) the gap to other boxes (c) the line round the box (d) a solid or dotted edge
-
21.🔗 Which address opens when you click this link?
<a href="maths.html">Art corner</a> (a) art.html (b) Art corner (c) maths.html (d) news.html - 22.Which of these is a strong password? (a) 111111 (b) abcd1234 (c) riya2014 (d) Chai$Cup_19x
- 23.What does background-color do? (a) makes the text bold (b) picks the font style (c) colours behind the text (d) sets the letter colour
- 24.🔢 In a basic web page file, which comes first: “</html>” or “</body>”? (a) </body> (b) </html>
-
25.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="150"> (a) fort.jpg (b) bus.jpg (c) Our school bus (d) tiger.jpg -
26.🔁 What does this code print?
let temp = 13;
if (temp >= 13) {
console.log("Hot");
} else {
console.log("Cool");
} (a) Hot (b) Cool - 27.🏷️ Every HTML tag starts with which sign? (a) { (b) < (c) ( (d) [
-
28.🌍 What is the protocol in this URL?
https://www.example.net/art/gallery.html (a) www.example.net (b) http (c) /art/gallery.html (d) https - 29.⚖️ Which selector is the strongest? (a) a class selector (b) an id selector (c) an element selector
- 30.True or false: in <img>, src names the picture file. (a) False (b) True
- 31.🎯 What kind of selector is .star? (a) an id selector (b) a class selector (c) an element selector
-
32.📱 The screen is 414px wide. Does the rule inside @media apply?
p {
font-size: 20px;
}
@media (min-width: 600px) {
p {
font-size: 22px;
}
} (a) No (b) Yes - 33.💪 Which justify-content value packs boxes at the end? (a) center (b) flex-end (c) flex-start (d) space-between
-
34.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow<br>Birds sing</p> - 35.♿ Does this help everyone, or make the page harder to use: link text “click here”? (a) helps everyone (b) makes it harder
- 36.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
-
37.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 70px;
padding: 20px;
border: 1px solid black;
margin: 15px;
} - 38.What does font-size do? (a) centres a heading (b) sets the letter colour (c) makes letters bigger (d) picks the font style
-
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="300"> (a) Map of India (b) A red kite (c) width (d) kite.png - 40.True or false: JavaScript changes the page live. (a) False (b) True
Answer key
- ;
- 8
- weak
- My Hobbies
- <img>
- semantic
- 600px or narrower
- -->
- flex-start
- False
- Cool
- safe
- checks a quiz answer
- The red kite
- the later one
- <li class="menu">
- news.html
- h1
- 1
- the gap round content
- maths.html
- Chai$Cup_19x
- colours behind the text
- </body>
- bus.jpg
- Hot
- <
- https
- an id selector
- True
- a class selector
- No
- flex-end
- 3
- makes it harder
- <!--
- 112
- makes letters bigger
- A red kite
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids