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.⚡ Which tag holds JavaScript in a page? (a) <script> (b) <style> (c) <code> (d) <js>
-
2.🔁 What does this code print?
let age = 7;
if (age < 37) {
console.log("teen");
} else {
console.log("child");
} (a) child (b) teen - 3.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) bright green (c) magenta (d) black
- 4.📦 In the box model, which part is the text or picture? (a) content (b) padding (c) margin (d) border
-
5.🔍 One closing tag is missing. Which one?
<u>I love mangoes.</u>
<i>Good morning!</i>
<b>Our school trip (a) </em> (b) </i> (c) </u> (d) </b> - 6.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
- 7.True or false: <b> is an empty tag. (a) True (b) False
- 8.🌍 What does a web address (URL) tell the browser? (a) the page colour (b) how old you are (c) where the page is (d) your password
- 9.Which of these is true of a code editor? (a) opens web pages for us (b) sends pages over the net (c) has an address bar (d) shows line numbers
-
10.🌍 What is the path in this URL?
http://www.example.com/maths/tables.html (a) http (b) /index.html (c) www.example.com (d) /maths/tables.html - 11.True or false: in <img>, alt shows if the image fails. (a) False (b) True
- 12.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
- 13.🌈 In #0000b8 the blue part is the hex number b8. What is it as a normal number?
- 14.True or false: <footer> sits at the bottom. (a) False (b) True
-
15.📱 The screen is 820px wide. Does the rule inside @media apply?
p {
font-size: 16px;
}
@media (min-width: 600px) {
p {
font-size: 18px;
}
} (a) No (b) Yes - 16.True or false: “images with no alt” helps everyone use the page. (a) False (b) True
- 17.🌐 Which one colours code to help us? (a) a web server (b) a code editor (c) a web browser
- 18.🎨 Which tag holds CSS inside the head? (a) <script> (b) <css> (c) <body> (d) <style>
- 19.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
- 20.Which colour pair is hard to read? (a) yellow on black (b) dark grey on white (c) black on white (d) pink on red
- 21.🛡️ Should you share your password with your best friend? (a) No (b) Yes
-
22.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 170px;
justify-content: flex-start;
}
Inside are 3 boxes, each 50px wide (no margins). -
23.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 200px;
justify-content: center;
}
Inside are 2 boxes, each 60px wide (no margins). - 24.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 6 (d) 3
-
25.🔗 Where does this link open?
<a href="about.html">About us</a> (a) in the same tab (b) in a new tab - 26.True or false: padding is space inside the border. (a) False (b) True
- 27.🔁 Which word runs code only when something is true? (a) for (b) let (c) log (d) if
-
28.🔁 What does this code print?
let score = 28;
if (score > 24) {
console.log("You win");
} else {
console.log("Play again");
} (a) Play again (b) You win -
29.🌍 What is the domain name in this URL?
http://www.example.com/games/chess.html (a) kids.example.org (b) www.example.com (c) http (d) /games/chess.html -
30.⚖️ What colour is the text of this element?
<p class="red" id="logo">Hi</p>
CSS:
.red { color: orange; }
#logo { color: green; } (a) orange (b) purple (c) yellow (d) green -
31.🖌️ What colour are the letters?
h1 {
color: blue;
background-color: red;
text-align: right;
font-size: 20px;
} (a) red (b) blue (c) yellow -
32.🔍 One closing tag is missing. Which one?
<b>Good morning!</b>
<p>Fun facts
<u>I love mangoes.</u> (a) </u> (b) </h1> (c) </b> (d) </p> - 33.✍️ Which sign goes between a property and its value? (a) ; (b) : (c) = (d) -
- 34.True or false: <main> holds copyright notes. (a) True (b) False
- 35.True or false: “colour as the only clue” makes the page harder to use. (a) False (b) True
- 36.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Markup (d) Machine
- 37.What does justify-content: space-between do? (a) puts boxes in the middle (b) packs boxes at the start (c) equal gaps, none at ends (d) packs boxes at the end
- 38.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a slash / (d) a dot .
- 39.🎯 Which element does the selector li style? (a) <p id="end"> (b) <div> (c) <li class="note"> (d) <span class="note">
- 40.Which of these is not safe to do online? (a) tell a trusted adult (b) think before you post (c) ask before downloading (d) share your password
Answer key
- <script>
- teen
- black
- content
- </b>
- href
- False
- where the page is
- shows line numbers
- /maths/tables.html
- True
- <img>
- 184
- True
- Yes
- False
- a code editor
- <style>
- <a href="about.html">
- pink on red
- No
- 20
- 40
- 6
- in the same tab
- True
- if
- You win
- www.example.com
- green
- blue
- </p>
- :
- False
- True
- Markup
- equal gaps, none at ends
- a slash /
- <li class="note">
- share your password
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids