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.✍️ What value is given to font-style in this rule?
.note {
width: 300px;
color: red;
font-style: italic;
font-size: 20px;
} (a) red (b) font-style (c) 20px (d) italic - 2.Which of these is safe to do online? (a) tell a trusted adult (b) type a password on http (c) click prize links (d) share your OTP
- 3.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h1> or <h3>? (a) <h4> (b) <h3> (c) <h5> (d) <h1>
- 4.🎯 Which element does the selector .big style? (a) <h2 id="big"> (b) <h2 class="big"> (c) <li class="box"> (d) <h2 class="red">
- 5.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 6.Which of these is true of a web browser? (a) saves our .html files (b) stores a website’s files (c) colours code to help us (d) turns HTML into a page
-
7.🔁 What does this code print?
let marks = 10;
if (marks > 30) {
console.log("Pass");
} else {
console.log("Try again");
} (a) Pass (b) Try again - 8.📝 Which input type picks a day? (a) password (b) email (c) date (d) submit
- 9.📊 Which tag makes one data cell? (a) <table> (b) <td> (c) <tr> (d) <th>
- 10.🌈 Which hex code is cyan? (a) #ffff00 (b) #ff00ff (c) #00ffff (d) #00ff00
-
11.🔁 What does this code print?
let marks = 3;
if (marks < 33) {
console.log("Pass");
} else {
console.log("Try again");
} (a) Pass (b) Try again - 12.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
- 13.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h2>? (a) <h5> (b) <h1> (c) <h2> (d) <h4>
- 14.🔍 Which is the odd one out? (a) changes the page live (b) lays out the page (c) counts down a timer (d) reacts to a button click
- 15.🧭 Is <header> semantic or not semantic? (a) not semantic (b) semantic
- 16.📝 Which input type is for an email address? (a) submit (b) number (c) email (d) password
- 17.🎯 What kind of selector is #top? (a) a class selector (b) an id selector (c) an element selector
- 18.True or false: <caption> gives the table a title. (a) False (b) True
-
19.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h2>Hello, world!</h2>
<p>Fun facts</p>
<h4>Cricket is fun.</h4>
<h3>Good morning!</h3> -
20.⚡ What number does this code print?
let coins = 9;
coins = coins + 15;
coins = coins - 16;
console.log(coins); -
21.⚖️ What colour is the text of this element?
<h1 class="box" id="end">Hi</h1>
CSS:
#end { color: yellow; }
.box { color: red; }
h1 { color: white; } (a) red (b) yellow (c) white (d) orange -
22.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 150px;
justify-content: flex-end;
}
Inside are 3 boxes, each 40px wide (no margins). - 23.True or false: JavaScript checks a quiz answer. (a) True (b) False
-
24.🔁 How many numbers does this code print?
for (let i = 0; i < 12; i = i + 3) {
console.log(i);
} - 25.🚀 What is the home page file of a website usually called? (a) home.css (b) main.png (c) index.html (d) start.js
-
26.📱 The screen is 1100px wide. Does the rule inside @media apply?
p {
font-size: 24px;
}
@media (max-width: 480px) {
p {
font-size: 20px;
}
} (a) Yes (b) No - 27.💬 Does the browser show comments on the page? (a) Yes (b) No
-
28.⚡ What number does this code print?
let coins = 14;
coins = coins + 4;
coins = coins - 16;
console.log(coins); - 29.True or false: alert("Hi"); goes in index.html. (a) False (b) True
-
30.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 220px;
padding: 5px;
border: 1px solid black;
margin: 10px;
} - 31.🔢 To build and share your first web page, which comes FIRST? (a) plan what to show (b) write the HTML (c) test in a browser (d) publish it online
- 32.Which of these is an empty tag? (a) <title> (b) <b> (c) <p> (d) <br>
- 33.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Markup (c) Machine (d) Modern
- 34.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
-
35.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 240px;
padding: 25px;
border: 1px solid black;
margin: 10px;
} -
36.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (min-width: 480px) {
p {
font-size: 20px;
}
} - 37.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
-
38.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>My best friend</p>
<p>Our school trip</p>
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> --> - 39.True or false: .note is an element selector. (a) False (b) True
-
40.🌍 What is the path in this URL?
https://learn.example.com/art/gallery.html (a) /news/today.html (b) https (c) /art/gallery.html (d) learn.example.com
Answer key
- italic
- tell a trusted adult
- <h5>
- <h2 class="big">
- an opening tag
- turns HTML into a page
- Try again
- date
- <td>
- #00ffff
- Pass
- <ol>
- <h1>
- lays out the page
- semantic
- an id selector
- True
- 4
- 8
- yellow
- 30
- True
- 4
- index.html
- No
- No
- 2
- False
- 232
- plan what to show
- <br>
- Markup
- a web server
- 312
- 20
- in the body
- 3
- False
- /art/gallery.html
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids