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.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
p {
font-size: 24px;
}
@media (min-width: 480px) {
p {
font-size: 28px;
}
} - 2.Which of these is a weak password? (a) Blue@Tiger_74 (b) Mango#Kite29! (c) 123456 (d) Chai$Cup_19x
- 3.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <ul> (c) <li>
- 4.True or false: “tiny grey text” helps everyone use the page. (a) False (b) True
-
5.🔗 Which words do you click on?
<a href="about.html">Play games</a> (a) about.html (b) href (c) Play games (d) About us - 6.Which of these is margin? (a) the line round the box (b) a solid or dotted edge (c) the text or picture (d) space outside the border
-
7.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Banana</li>
<li>Guava</li>
<li>Grapes</li>
<li>Orange</li>
</ol> - 8.What does text-align do? (a) colours behind the text (b) centres a heading (c) picks the font style (d) sets the letter colour
- 9.⚡ A JavaScript file usually ends with which extension? (a) .css (b) .html (c) .jpg (d) .js
- 10.🌍 Which one sends the page back? (a) the server (b) the URL (c) the browser (d) HTTPS
-
11.🔁 How many times does this code print “Hi”?
for (let i = 2; i <= 9; i++) {
console.log("Hi");
} -
12.✍️ How many declarations (property: value pairs) are in this rule?
.note {
font-size: 20px;
text-align: center;
background-color: yellow;
} -
13.✍️ How many declarations (property: value pairs) are in this rule?
h1 {
padding: 8px;
width: 300px;
} -
14.⚖️ What colour is the text of this element?
<p class="star" id="hero">Hi</p>
CSS:
.star { color: green; }
p { color: blue; } (a) green (b) yellow (c) black (d) blue -
15.🔍 Which line is missing its closing tag?
line 1: <h1>The red kite</h1>
line 2: <em>Good morning!</em>
line 3: <b>My best friend (a) line 1 (b) line 3 (c) line 2 - 16.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) green (d) red
-
17.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="300"> -
18.⚡ What number does this code print?
let apples = 27;
apples = apples + 9;
apples = apples - 25;
console.log(apples); -
19.⚖️ What colour is the text of this element?
<p class="star" id="main">Hi</p>
CSS:
#main { color: white; }
p { color: green; }
.star { color: purple; } (a) purple (b) black (c) white (d) green - 20.📊 Which tag makes one data cell? (a) <table> (b) <td> (c) <caption> (d) <th>
-
21.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>Rain today</h2>
<h2>The red kite</h2>
<p>I love mangoes.</p>
<p>I love mangoes.</p> - 22.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <p> (d) <pic>
-
23.⚖️ What colour is the text of this element?
<h1 class="red" id="hero">Hi</h1>
CSS:
h1 { color: black; }
#hero { color: yellow; } (a) orange (b) yellow (c) black (d) blue - 24.🔐 Is S0lar!Pen#8 a strong or a weak password? (a) strong (b) weak
- 25.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z
- 26.🔐 Is 123456 a strong or a weak password? (a) strong (b) weak
- 27.True or false: <input type="radio"> is for an email address. (a) True (b) False
- 28.🧭 How many <main> parts should a page have? (a) ten (b) one (c) none (d) three
-
29.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Match report</h1>
<p>Try this poha.</p>
</body>
</html> (a) Art Gallery (b) index.html (c) Match report (d) Try this poha. - 30.Which of these is true of <nav>? (a) holds the logo and title (b) sits at the bottom (c) holds one blog post (d) helps you move around
-
31.📱 The screen is 820px wide. Does the rule inside @media apply?
p {
font-size: 16px;
}
@media (max-width: 480px) {
p {
font-size: 14px;
}
} (a) No (b) Yes -
32.⚡ What number does this code print?
let marks = 11;
marks = marks + 12;
marks = marks - 1;
console.log(marks); -
33.🎯 Which CSS selector matches this element?
<h1 class="big" id="top">Hello</h1> (a) .top (b) #intro (c) .big (d) .red - 34.Which of these is true of a web browser? (a) saves our .html files (b) colours code to help us (c) is where we type code (d) opens web pages for us
-
35.⚖️ What colour is the text of this element?
<h1 class="box" id="top">Hi</h1>
CSS:
.box { color: black; }
#top { color: green; }
h1 { color: purple; } (a) purple (b) black (c) green (d) yellow - 36.✍️ CSS declarations go inside which brackets? (a) [ ] (b) < > (c) ( ) (d) { }
- 37.What does justify-content: flex-start do? (a) equal gaps, none at ends (b) puts boxes in the middle (c) packs boxes at the start (d) packs boxes at the end
- 38.True or false: <input type="email"> takes only numbers. (a) True (b) False
- 39.🔍 Which is the odd one out? (a) makes headings and lists (b) reacts to a button click (c) gives the page structure (d) makes a form box
- 40.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
Answer key
- 28
- 123456
- <li>
- False
- Play games
- space outside the border
- 5
- centres a heading
- .js
- the server
- 8
- 3
- 2
- green
- line 3
- blue
- 300
- 11
- white
- <td>
- 3
- <img>
- yellow
- strong
- F
- weak
- False
- one
- Art Gallery
- helps you move around
- No
- 22
- .big
- opens web pages for us
- green
- { }
- packs boxes at the start
- False
- reacts to a button click
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids