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: <a href="a.html">Go</a> goes in style.css. (a) True (b) False
-
2.✍️ How many declarations (property: value pairs) are in this rule?
.note {
border: 2px solid;
font-weight: bold;
padding: 8px;
} -
3.✍️ Which property is set to center in this rule?
h2 {
color: red;
border: 2px solid;
font-weight: bold;
text-align: center;
} (a) center (b) background-color (c) margin (d) text-align - 4.True or false: <header> sits at the very top. (a) False (b) True
- 5.🎯 What kind of selector is .card? (a) a class selector (b) an id selector (c) an element selector
-
6.✍️ Which property is set to red in this rule?
#top {
font-weight: bold;
margin: 10px;
color: red;
padding: 8px;
} (a) red (b) text-align (c) color (d) font-size -
7.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Mango</li>
<li>Litchi</li>
</ol> (a) bullets (b) numbers - 8.🌈 Which hex code is white? (a) #ff00ff (b) #00ff00 (c) #ffff00 (d) #ffffff
-
9.🔗 Which words do you click on?
<a href="games.html">School news</a> (a) href (b) games.html (c) Take the quiz (d) School news - 10.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) in a big heading (d) at the bottom
- 11.📊 In a table, which tag is a row? (a) <td> (b) <tb> (c) <th> (d) <tr>
-
12.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 4; i++) {
total = total + 8;
}
console.log(total); - 13.🎯 Which element does the selector .note style? (a) <div class="big"> (b) <div id="note"> (c) <div class="note"> (d) <span class="red">
- 14.Which of these has a closing tag? (a) <ul> (b) <hr> (c) <br> (d) <img>
- 15.True or false: <br> has a closing tag. (a) False (b) True
-
16.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (max-width: 600px) {
p {
font-size: 16px;
}
} -
17.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 3; i++) {
total = total + i;
}
console.log(total); - 18.True or false: JavaScript lays out the page. (a) True (b) False
- 19.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) alt (d) height
-
20.🔁 How many times does this code print “Welcome”?
for (let i = 2; i <= 8; i++) {
console.log("Welcome");
} - 21.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the later one (b) the first one (c) neither (d) the shorter one
- 22.What is <input type="number"> for? (a) takes only numbers (b) sends the form (c) is for an email address (d) is for one line of words
- 23.💬 How does an HTML comment start? (a) # (b) // (c) /* (d) <!--
-
24.🖌️ How big is the text, in px?
li {
color: orange;
background-color: purple;
font-size: 24px;
text-align: left;
} - 25.📝 Which input type lets you tick many? (a) radio (b) date (c) checkbox (d) number
-
26.✍️ What is the selector in this CSS rule?
li {
margin: 10px;
border: 2px solid;
font-style: italic;
font-weight: bold;
} (a) li (b) body (c) margin (d) 2px solid - 27.🔢 In a basic web page file, which comes first: “</body>” or “<head>”? (a) <head> (b) </body>
-
28.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="350"> (a) cake.jpg (b) Birthday cake (c) width (d) A happy dog - 29.🌈 Which colour of light is strongest in rgb(5, 167, 64)? (a) blue (b) green (c) red
-
30.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Our school trip</p>
<!-- <p>Hello, world!</p> --> - 31.True or false: .box { padding: 8px; } goes in style.css. (a) True (b) False
- 32.📱 Which tag helps phones show a page at the right size? (a) the title tag (b) the br tag (c) the viewport meta tag (d) the hr tag
-
33.🌍 What is the protocol in this URL?
http://www.example.net/games/chess.html (a) www.example.net (b) https (c) /games/chess.html (d) http - 34.⚡ Which tag holds JavaScript in a page? (a) <js> (b) <style> (c) <script> (d) <code>
-
35.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 220px;
padding: 10px;
border: 3px solid black;
margin: 5px;
} -
36.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<h2>The red kite</h2>
<p>Rain today</p>
<p>Hello, world!</p>
<h2>Cricket is fun.</h2>
<p>Rain today</p> -
37.🖌️ What colour is behind the letters?
li {
text-align: right;
background-color: red;
color: white;
font-size: 24px;
} (a) red (b) green (c) white - 38.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 39.🧭 Is <header> semantic or not semantic? (a) not semantic (b) semantic
- 40.True or false: HTTPS sends the page back. (a) True (b) False
Answer key
- False
- 3
- text-align
- True
- a class selector
- color
- numbers
- #ffffff
- School news
- on the browser tab
- <tr>
- 32
- <div class="note">
- <ul>
- False
- 16
- 6
- False
- alt
- 7
- the later one
- takes only numbers
- <!--
- 24
- checkbox
- li
- <head>
- Birthday cake
- green
- 2
- True
- the viewport meta tag
- http
- <script>
- 256
- 4
- red
- No
- semantic
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids