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.🔒 Is the connection to this address scrambled (encrypted)?
https://school.example.in/games/chess.html (a) Yes (b) No -
2.🔗 Where does this link open?
<a href="https://example.com">Maths fun</a> (a) in a new tab (b) in the same tab - 3.🔍 Which is the odd one out? (a) sets colours and fonts (b) lays out the page (c) makes a form box (d) changes the text size
- 4.📋 Which list suits a shopping list in any order? (a) <br> (b) <ul> (c) <ol> (d) <hr>
-
5.⚖️ What colour is the text of this element?
<p class="star" id="end">Hi</p>
CSS:
.star { color: blue; }
.star { color: red; } (a) black (b) purple (c) red (d) blue -
6.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 140px;
justify-content: flex-end;
}
Inside are 2 boxes, each 50px wide (no margins). -
7.🔁 What does this code print?
let age = 3;
if (age >= 15) {
console.log("teen");
} else {
console.log("child");
} (a) teen (b) child - 8.🔍 Which is the odd one out? (a) checks a quiz answer (b) shows a pop-up message (c) adds space around boxes (d) reacts to a button click
- 9.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h2> or <h5>? (a) <h3> (b) <h4> (c) <h5> (d) <h2>
- 10.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
- 11.📦 In the box model, which part is space outside the border? (a) content (b) margin (c) border (d) padding
- 12.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 10 (d) 4
-
13.🖌️ What colour are the letters?
p {
color: green;
background-color: white;
font-size: 20px;
text-align: right;
} (a) black (b) white (c) green - 14.📝 Which input type is for an email address? (a) submit (b) text (c) radio (d) email
- 15.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
- 16.🌐 Which one saves our .html files? (a) a web server (b) a code editor (c) a web browser
- 17.📦 In the box model, which part is a solid or dotted edge? (a) content (b) border (c) padding (d) margin
- 18.✍️ How does a CSS comment start? (a) // (b) /* (c) # (d) <!--
- 19.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 20.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h2> or <h1>? (a) <h1> (b) <h3> (c) <h2> (d) <h6>
-
21.✍️ What is the selector in this CSS rule?
#top {
font-weight: bold;
color: red;
} (a) li (b) font-weight (c) #top (d) red - 22.🌐 Which one hosts websites online? (a) a web server (b) a web browser (c) a code editor
-
23.🔁 What does this code print?
let score = 40;
if (score > 28) {
console.log("You win");
} else {
console.log("Play again");
} (a) Play again (b) You win -
24.🔍 Which line is missing its closing tag?
line 1: <b>Cricket is fun.
line 2: <h2>The red kite</h2>
line 3: <i>Rain today</i> (a) line 2 (b) line 1 (c) line 3 -
25.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>The red kite</p>
<p>Rain today</p>
<!-- <p>My pets</p> -->
<!-- <p>My best friend</p> --> - 26.Which of these is not safe to do online? (a) put secrets in comments (b) tell a trusted adult (c) use a strong password (d) keep passwords secret
- 27.Which of these is safe to do online? (a) click prize links (b) post your home address (c) use a strong password (d) type a password on http
-
28.🖌️ What colour is behind the letters?
li {
color: green;
font-size: 40px;
background-color: blue;
text-align: left;
} (a) purple (b) green (c) blue - 29.🔢 When you open a web page, which comes first: “DNS finds the server” or “the browser shows it”? (a) DNS finds the server (b) the browser shows it
-
30.🔍 Which line is missing its closing tag?
line 1: <h1>I love mangoes.
line 2: <i>Good morning!</i>
line 3: <p>The red kite</p> (a) line 2 (b) line 3 (c) line 1 - 31.✍️ In color: blue; which part is the property? (a) blue (b) color (c) ; (d) :
- 32.✍️ Which sign goes between a property and its value? (a) - (b) = (c) : (d) ;
-
33.📱 The screen is 414px wide. Does the rule inside @media apply?
p {
font-size: 20px;
}
@media (max-width: 1024px) {
p {
font-size: 14px;
}
} (a) Yes (b) No - 34.💬 How does an HTML comment start? (a) /* (b) # (c) // (d) <!--
-
35.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 260px;
padding: 10px;
border: 3px solid black;
margin: 5px;
} - 36.🌈 Which colour is #00ffff? (a) yellow (b) white (c) cyan (d) bright green
- 37.🚀 Which file should this code go in: let score = 0; (a) script.js (b) style.css (c) index.html
- 38.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <ol> (d) <p>
-
39.🔗 Which address opens when you click this link?
<a href="contact.html">Contact us</a> (a) contact.html (b) Contact us (c) maths.html (d) https://example.com - 40.🖼️ Which attribute of <img> names the picture file? (a) alt (b) height (c) width (d) src
Answer key
- Yes
- in the same tab
- makes a form box
- <ul>
- red
- 40
- child
- adds space around boxes
- <h5>
- <ol>
- margin
- 6
- green
- in the body
- a code editor
- border
- /*
- Yes
- <h1>
- #top
- a web server
- You win
- line 1
- 3
- put secrets in comments
- use a strong password
- blue
- DNS finds the server
- line 1
- color
- :
- Yes
- <!--
- 286
- cyan
- script.js
- <li>
- contact.html
- src
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids