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.True or false: in <img>, height shows if the image fails. (a) False (b) True
-
2.✍️ What value is given to font-style in this rule?
p {
background-color: yellow;
font-size: 20px;
font-style: italic;
} (a) 20px (b) red (c) font-style (d) italic -
3.🔍 Which line is missing its closing tag?
line 1: <h2>I love mangoes.</h2>
line 2: <small>Hello, world!
line 3: <u>My best friend</u> (a) line 3 (b) line 1 (c) line 2 -
4.🔁 What does this code print?
let marks = 14;
if (marks < 22) {
console.log("Pass");
} else {
console.log("Try again");
} (a) Pass (b) Try again - 5.🎯 Which element does the selector .star style? (a) <span id="star"> (b) <span class="menu"> (c) <span class="star"> (d) <p class="note">
- 6.🚀 You change your code. What should you do to see the change? (a) save and refresh (b) rename the folder (c) switch off the PC (d) delete the file
- 7.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) HyperText (c) Home Text (d) High Tech
- 8.Which of these is safe to do online? (a) post your home address (b) share your password (c) type a password on http (d) log out on shared PCs
- 9.True or false: HTML on its own can keep a high score. (a) False (b) True
- 10.🧭 Which semantic tag holds one blog post? (a) <header> (b) <footer> (c) <main> (d) <article>
-
11.📱 The screen is 540px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (min-width: 600px) {
p {
font-size: 20px;
}
} (a) No (b) Yes -
12.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>Good morning!</h2>
<h2>Our school trip</h2>
<h2>Fun facts</h2> -
13.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>I love mangoes.</p>
<p>Good morning!</p>
<!-- <p>Fun facts</p> --> (a) I love mangoes. (b) Good morning! (c) Fun facts (d) My best friend - 14.📦 In the box model, which part is the gap to other boxes? (a) padding (b) content (c) border (d) margin
-
15.✍️ Which property is set to yellow in this rule?
h2 {
background-color: yellow;
margin: 10px;
padding: 8px;
} (a) yellow (b) background-color (c) padding (d) margin - 16.True or false: margin is space outside the border. (a) False (b) True
- 17.True or false: HTML on its own cannot make a form. (a) True (b) False
- 18.🔢 On a typical page, from top to bottom, which comes first: “<header>” or “<nav>”? (a) <nav> (b) <header>
- 19.📝 Which input type lets you pick only one? (a) text (b) checkbox (c) radio (d) submit
- 20.📊 Which tag makes a heading cell? (a) <th> (b) <td> (c) <tr> (d) <caption>
- 21.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
- 22.Which colour pair is easy to read? (a) yellow on white (b) light grey on white (c) white on dark blue (d) blue on purple
- 23.✍️ In color: blue; which part is the value? (a) ; (b) : (c) color (d) blue
- 24.Which of these is an empty tag? (a) <p> (b) <title> (c) <input> (d) <ul>
- 25.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a alt="about.html">
- 26.True or false: <footer> sits at the bottom. (a) True (b) False
-
27.🔍 One closing tag is missing. Which one?
<i>My pets</i>
<small>The red kite</small>
<h2>Cricket is fun. (a) </i> (b) </small> (c) </p> (d) </h2> -
28.⚖️ What colour is the text of this element?
<h1 class="big" id="logo">Hi</h1>
CSS:
.big { color: white; }
#logo { color: purple; }
h1 { color: blue; } (a) white (b) purple (c) red (d) blue -
29.🖌️ What colour is behind the letters?
li {
color: purple;
background-color: black;
text-align: left;
font-size: 36px;
} (a) blue (b) black (c) purple - 30.🌍 Which one stores the site’s files? (a) the browser (b) the URL (c) HTTPS (d) the server
- 31.🏷️ Which is the closing tag for <u>? (a) <u/> (b) <\u> (c) </u> (d) <u>
-
32.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (max-width: 1024px) {
p {
font-size: 14px;
}
} -
33.🔗 Which address opens when you click this link?
<a href="about.html">Take the quiz</a> (a) contact.html (b) https://example.com (c) Take the quiz (d) about.html - 34.True or false: <ul><li>Art</li></ul> goes in style.css. (a) True (b) False
- 35.🌍 Which one sends the page back? (a) HTTPS (b) the server (c) the browser (d) the URL
- 36.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) <!DOCTYPE html> (c) </html> (d) <body>
-
37.🔗 Which words do you click on?
<a href="quiz.html">Take the quiz</a> (a) Play games (b) quiz.html (c) href (d) Take the quiz - 38.🎨 Which tag connects an outside CSS file? (a) <a> (b) <img> (c) <link> (d) <css>
- 39.✍️ CSS declarations go inside which brackets? (a) ( ) (b) { } (c) < > (d) [ ]
- 40.🔠 Are headings shown in bold by default? (a) No (b) Yes
Answer key
- False
- italic
- line 2
- Pass
- <span class="star">
- save and refresh
- HyperText
- log out on shared PCs
- False
- <article>
- No
- 1
- Fun facts
- margin
- background-color
- True
- False
- <header>
- radio
- <th>
- <li>
- white on dark blue
- blue
- <input>
- <a href="about.html">
- True
- </h2>
- purple
- black
- the server
- </u>
- 14
- about.html
- False
- the server
- <!DOCTYPE html>
- Take the quiz
- <link>
- { }
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids