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.✍️ CSS declarations go inside which brackets? (a) ( ) (b) [ ] (c) < > (d) { }
- 2.Which colour pair is easy to read? (a) yellow on white (b) dark grey on white (c) blue on purple (d) light grey on white
- 3.🛡️ Online: is it safe to share your OTP? (a) safe (b) not safe
-
4.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 60px;
padding: 30px;
border: 3px solid black;
margin: 10px;
} - 5.🔢 To build and share your first web page, which comes first: “write the HTML” or “test in a browser”? (a) test in a browser (b) write the HTML
- 6.🌈 In #005200 the green part is the hex number 52. What is it as a normal number?
-
7.🎯 Which CSS selector matches this element?
<h2 class="big" id="hero">Hello</h2> (a) li (b) .big (c) .red (d) #top - 8.🎯 What kind of selector is .star? (a) an element selector (b) a class selector (c) an id selector
-
9.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 90px;
padding: 25px;
border: 1px solid black;
margin: 10px;
} - 10.📝 Which input type is for one line of words? (a) submit (b) number (c) text (d) email
- 11.True or false: a web browser stores a website’s files. (a) False (b) True
- 12.💾 A web page file usually ends with which extension? (a) .png (b) .html (c) .mp3 (d) .txt
- 13.🏷️ Which is the closing tag for <p>? (a) <p> (b) <\p> (c) </p> (d) <p/>
-
14.🖌️ What colour is behind the letters?
p {
color: white;
font-size: 36px;
background-color: blue;
text-align: left;
} (a) blue (b) black (c) white - 15.✍️ In color: blue; which part is the value? (a) : (b) blue (c) color (d) ;
- 16.🌈 Which colour of light is strongest in rgb(160, 84, 64)? (a) blue (b) green (c) red
- 17.True or false: <p>Hello!</p> goes in index.html. (a) False (b) True
- 18.True or false: <header> holds a news story. (a) False (b) True
- 19.What does justify-content: center do? (a) packs boxes at the end (b) equal gaps, none at ends (c) puts boxes in the middle (d) packs boxes at the start
- 20.True or false: a web server sends pages over the net. (a) False (b) True
-
21.♿ Is this heading order correct (no level skipped)?
<h1> → <h1> → <h1> → <h3> (a) No (b) Yes -
22.🖌️ What colour is behind the letters?
h2 {
font-size: 32px;
color: red;
text-align: left;
background-color: white;
} (a) red (b) green (c) white -
23.✍️ How many declarations (property: value pairs) are in this rule?
li {
text-align: center;
margin: 10px;
font-style: italic;
font-weight: bold;
} - 24.Which of these is not safe to do online? (a) think before you post (b) ask before downloading (c) log out on shared PCs (d) post your home address
- 25.📦 In the box model, which part is a solid or dotted edge? (a) content (b) margin (c) padding (d) border
- 26.True or false: <img> has a closing tag. (a) True (b) False
-
27.🔁 What does this code print?
let age = 7;
if (age > 5) {
console.log("teen");
} else {
console.log("child");
} (a) teen (b) child -
28.⚡ What number does this code print?
let a = 48;
let b = 28;
console.log(a + b); - 29.True or false: <input type="date"> picks a day. (a) True (b) False
- 30.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) height (c) src (d) alt
-
31.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Orange</li>
<li>Mango</li>
<li>Grapes</li>
<li>Guava</li>
</ol> - 32.What does justify-content: flex-end do? (a) packs boxes at the end (b) packs boxes at the start (c) puts boxes in the middle (d) equal gaps, none at ends
- 33.🛡️ Online: is it safe to put secrets in comments? (a) safe (b) not safe
- 34.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h1> or <h3>? (a) <h1> (b) <h5> (c) <h3> (d) <h6>
- 35.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <ol> (d) <li>
- 36.🔍 Which is the odd one out? (a) sets colours and fonts (b) adds space around boxes (c) changes the text size (d) gives the page structure
- 37.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 38.🏷️ Which is the closing tag for <strong>? (a) <\strong> (b) <strong/> (c) </strong> (d) <strong>
-
39.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>Fun facts</p>
<!-- <p>Our school trip</p> --> (a) Rain today (b) Our school trip (c) Fun facts - 40.True or false: body is a class selector. (a) False (b) True
Answer key
- { }
- dark grey on white
- not safe
- 146
- write the HTML
- 82
- .big
- a class selector
- 142
- text
- False
- .html
- </p>
- blue
- blue
- red
- True
- False
- puts boxes in the middle
- True
- No
- white
- 4
- post your home address
- border
- False
- teen
- 76
- True
- alt
- 5
- packs boxes at the end
- not safe
- <h6>
- <li>
- gives the page structure
- an empty tag
- </strong>
- Our school trip
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids