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.🌍 What is the path in this URL?
https://www.example.com/games/chess.html (a) /about.html (b) /games/chess.html (c) www.example.com (d) https - 2.🔢 In a basic web page file, which comes LAST? (a) <head> (b) <html> (c) </head> (d) </html>
- 3.🔢 On a typical page, from top to bottom, which comes first: “<footer>” or “<header>”? (a) <footer> (b) <header>
-
4.⚖️ What colour is the text of this element?
<p class="note" id="end">Hi</p>
CSS:
.note { color: white; }
#end { color: purple; } (a) white (b) blue (c) green (d) purple - 5.Which of these is true of a web server? (a) opens web pages for us (b) sends pages over the net (c) has an address bar (d) shows pages from the web
- 6.🔁 Which word runs code only when something is true? (a) for (b) let (c) if (d) log
- 7.🚀 You change your code. What should you do to see the change? (a) switch off the PC (b) save and refresh (c) delete the file (d) rename the folder
- 8.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) in a big heading (d) at the bottom
- 9.True or false: “link text “click here”” makes the page harder to use. (a) True (b) False
-
10.🔗 Which address opens when you click this link?
<a href="about.html">Visit the site</a> (a) https://example.com (b) about.html (c) contact.html (d) Visit the site - 11.🎯 Which sign starts an id selector? (a) . (b) # (c) & (d) @
- 12.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 4 (d) 2
- 13.🔐 Is Blue@Tiger_74 a strong or a weak password? (a) strong (b) weak
-
14.✍️ Which property is set to 300px in this rule?
body {
padding: 8px;
width: 300px;
font-style: italic;
text-align: center;
} (a) font-style (b) width (c) 300px (d) color -
15.⚡ What does this code print? (Look at the quotes!)
let x = "9";
let y = 6;
console.log(x + y); (a) 96 (b) Error (c) 15 -
16.✍️ How many declarations (property: value pairs) are in this rule?
.note {
padding: 8px;
} -
17.📱 The screen is 375px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (min-width: 1024px) {
p {
font-size: 18px;
}
} (a) No (b) Yes - 18.🌍 Which one shows the page to you? (a) HTTPS (b) the URL (c) the server (d) the browser
-
19.🔁 What is the LAST number this code prints?
for (let i = 0; i < 15; i = i + 3) {
console.log(i);
} -
20.🌍 What is the protocol in this URL?
https://www.example.net/index.html (a) https (b) www.example.net (c) http (d) /index.html -
21.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Jamun</li>
<li>Litchi</li>
</ol> (a) numbers (b) bullets - 22.🖌️ Which CSS property makes the text bold? (a) text-align (b) color (c) background-color (d) font-weight
- 23.🔢 To build and share your first web page, which comes LAST? (a) add CSS styles (b) test in a browser (c) publish it online (d) write the HTML
-
24.✍️ What value is given to border in this rule?
body {
font-weight: bold;
border: 2px solid;
font-size: 20px;
font-style: italic;
} (a) 2px solid (b) 300px (c) italic (d) border - 25.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
26.⚖️ What colour is the text of this element?
<h1 class="box" id="main">Hi</h1>
CSS:
#main { color: red; }
#main { color: black; } (a) red (b) orange (c) black (d) purple - 27.True or false: in <img>, alt sets how wide it is. (a) True (b) False
-
28.🔍 Which line is missing its closing tag?
line 1: <h1>The red kite</h1>
line 2: <b>My best friend
line 3: <i>Our school trip</i> (a) line 1 (b) line 3 (c) line 2 - 29.✍️ CSS declarations go inside which brackets? (a) < > (b) { } (c) [ ] (d) ( )
- 30.🔍 Which is the odd one out? (a) stores a website’s files (b) saves our .html files (c) sends pages over the net (d) hosts websites online
- 31.🧩 Which language makes a form box? (a) CSS (b) JavaScript (c) HTML
- 32.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
-
33.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (max-width: 480px) {
p {
font-size: 14px;
}
} -
34.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 7; i++) {
total = total + 6;
}
console.log(total); - 35.True or false: <td> makes one table row. (a) True (b) False
- 36.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 100 (d) 1000
-
37.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 180px;
justify-content: flex-end;
}
Inside are 2 boxes, each 80px wide (no margins). - 38.📱 Which tag helps phones show a page at the right size? (a) the title tag (b) the viewport meta tag (c) the hr tag (d) the br tag
- 39.True or false: in <img>, height shows if the image fails. (a) True (b) False
-
40.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine<br>Sky is blue<br>Kites fly high<br>Rivers flow</p>
Answer key
- /games/chess.html
- </html>
- <header>
- purple
- sends pages over the net
- if
- save and refresh
- on the browser tab
- True
- about.html
- #
- 3
- strong
- width
- 96
- 1
- No
- the browser
- 12
- https
- numbers
- font-weight
- publish it online
- 2px solid
- has a closing tag
- black
- False
- line 2
- { }
- saves our .html files
- HTML
- href
- 20
- 42
- False
- 255
- 20
- the viewport meta tag
- False
- 5
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids