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: <title> has a closing tag. (a) True (b) False
- 2.⚖️ Which selector is the weakest? (a) an id selector (b) a class selector (c) an element selector
-
3.⚖️ What colour is the text of this element?
<h1 class="big" id="logo">Hi</h1>
CSS:
.big { color: black; }
h1 { color: yellow; } (a) black (b) white (c) red (d) yellow - 4.True or false: “skipping heading levels” makes the page harder to use. (a) True (b) False
- 5.True or false: <ul> lists steps in order. (a) True (b) False
-
6.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="300"> -
7.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>The red kite</p>
<p>Cricket is fun.</p> (a) Cricket is fun. (b) Fun facts (c) The red kite - 8.Which of these is not safe to do online? (a) use a strong password (b) tell a trusted adult (c) download from pop-ups (d) ask before downloading
- 9.True or false: <input type="email"> is for an email address. (a) False (b) True
-
10.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 6; i++) {
total = total + 6;
}
console.log(total); - 11.🌍 Which one shows the page to you? (a) HTTPS (b) the browser (c) the URL (d) the server
-
12.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (max-width: 1024px) {
p {
font-size: 8px;
}
} -
13.📊 How many cells does this table have in all?
<table>
<tr><td>Jamun</td><td>Jamun</td><td>Jamun</td><td>Orange</td></tr>
<tr><td>Guava</td><td>Orange</td><td>Papaya</td><td>Guava</td></tr>
</table> - 14.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is free (b) the site is fast (c) the data is scrambled (d) the site is a game
- 15.True or false: <b> has a closing tag. (a) False (b) True
-
16.🔁 What does this code print?
let score = 50;
if (score > 6) {
console.log("You win");
} else {
console.log("Play again");
} (a) You win (b) Play again - 17.Which of these goes in the head? (a) <img> (b) <p> (c) <style> (d) <ul>
- 18.Which of these goes in the body? (a) <style> (b) <img> (c) <meta charset="utf-8"> (d) <title>
- 19.True or false: JavaScript gives the page structure. (a) True (b) False
-
20.🖌️ What colour are the letters?
p {
color: orange;
font-size: 36px;
text-align: center;
background-color: green;
} (a) green (b) blue (c) orange - 21.True or false: <input> has a closing tag. (a) False (b) True
-
22.📊 How many cells are in each row?
<table>
<tr><th>Name</th><th>Fruit</th></tr>
<tr><td>Papaya</td><td>Grapes</td></tr>
</table> - 23.🌈 Which colour of light is strongest in rgb(199, 34, 2)? (a) red (b) blue (c) green
- 24.🌍 Which one stores the site’s files? (a) HTTPS (b) the browser (c) the URL (d) the server
- 25.💪 Which justify-content value packs boxes at the end? (a) center (b) space-between (c) flex-end (d) flex-start
- 26.True or false: <input type="checkbox"> picks a day. (a) True (b) False
- 27.✍️ How does a CSS comment start? (a) # (b) <!-- (c) // (d) /*
- 28.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
-
29.⚖️ What colour is the text of this element?
<h1 class="big" id="intro">Hi</h1>
CSS:
h1 { color: purple; }
h1 { color: red; } (a) green (b) red (c) black (d) purple -
30.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 6; i++) {
total = total + 9;
}
console.log(total); - 31.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dot . (d) a dollar $
-
32.🌍 What is the protocol in this URL?
https://kids.example.org/news/today.html (a) http (b) /news/today.html (c) https (d) kids.example.org - 33.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
34.✍️ What value is given to color in this rule?
.note {
font-size: 20px;
margin: 10px;
color: red;
} (a) center (b) color (c) 20px (d) red - 35.🚀 Which file should this code go in: alert(score); (a) index.html (b) script.js (c) style.css
-
36.🔗 Where does this link open?
<a href="art.html">About us</a> (a) in a new tab (b) in the same tab - 37.⚖️ Which selector is the strongest? (a) a class selector (b) an id selector (c) an element selector
- 38.📝 What does <br> do? (a) makes text bold (b) starts a new line (c) makes a list (d) adds a picture
- 39.🎯 Which element does the selector .menu style? (a) <p class="note"> (b) <p id="menu"> (c) <h1 class="big"> (d) <p class="menu">
- 40.🎨 One CSS file can style how many pages? (a) only one image (b) no pages (c) many pages (d) only one word
Answer key
- True
- an element selector
- black
- True
- False
- 300
- Fun facts
- download from pop-ups
- True
- 36
- the browser
- 8
- 8
- the data is scrambled
- True
- You win
- <style>
- <img>
- False
- orange
- False
- 2
- red
- the server
- flex-end
- False
- /*
- 6
- red
- 54
- a slash /
- https
- an opening tag
- red
- script.js
- in the same tab
- an id selector
- starts a new line
- <p class="menu">
- many pages
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids