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 CSS property makes the text bold? (a) font-size (b) font-family (c) color (d) font-weight
- 2.What does font-family do? (a) sets the letter colour (b) picks the font style (c) centres a heading (d) makes the text bold
- 3.🔢 In a basic web page file, which comes first: “</body>” or “<head>”? (a) </body> (b) <head>
-
4.⚖️ What colour is the text of this element?
<p class="star" id="top">Hi</p>
CSS:
p { color: orange; }
p { color: purple; } (a) blue (b) red (c) orange (d) purple - 5.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
- 6.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
-
7.🔁 How many times does this code print “Well done”?
for (let i = 0; i <= 4; i++) {
console.log("Well done");
} - 8.True or false: HTML checks a quiz answer. (a) False (b) True
- 9.🎯 What kind of selector is img? (a) an element selector (b) a class selector (c) an id selector
- 10.🧭 Why use <nav> instead of <div> for a menu? (a) it makes text red (b) it loads faster (c) it tells its meaning (d) it adds pictures
- 11.📊 Where do <td> cells go? (a) inside a <li> (b) inside the <head> (c) inside a <p> (d) inside a <tr>
-
12.🔗 Which words do you click on?
<a href="about.html">Maths fun</a> (a) Art corner (b) Maths fun (c) href (d) about.html -
13.🖌️ How big is the text, in px?
h1 {
font-size: 20px;
background-color: green;
color: yellow;
text-align: center;
} - 14.✍️ How does a CSS comment start? (a) # (b) // (c) <!-- (d) /*
-
15.🔗 Which words do you click on?
<a href="contact.html">Take the quiz</a> (a) href (b) Play games (c) contact.html (d) Take the quiz - 16.Which of these does HTML do? (a) rounds box corners (b) counts down a timer (c) adds space around boxes (d) makes a form box
- 17.🔍 Which is the odd one out? (a) turns HTML into a page (b) hosts websites online (c) answers page requests (d) sends pages over the net
- 18.🛡️ Online: is it safe to put secrets in comments? (a) safe (b) not safe
- 19.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h4> or <h1>? (a) <h4> (b) <h5> (c) <h1> (d) <h3>
-
20.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 280px;
justify-content: space-between;
}
Inside are 2 boxes, each 100px wide (no margins). -
21.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 150px;
padding: 20px;
border: 5px solid black;
margin: 10px;
} -
22.🔍 Which line is missing its closing tag?
line 1: <h1>The red kite</h1>
line 2: <b>My best friend</b>
line 3: <h3>Good morning! (a) line 3 (b) line 1 (c) line 2 - 23.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 3 (d) 2
- 24.What is <input type="password"> for? (a) sends the form (b) is for one line of words (c) lets you pick only one (d) hides what you type
-
25.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Mango</li>
<li>Jamun</li>
</ul> (a) numbers (b) bullets -
26.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Rain today</p>
<p>The red kite</p> - 27.True or false: <header> sits at the very top. (a) False (b) True
- 28.🔁 Which word runs code only when something is true? (a) if (b) for (c) let (d) log
-
29.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 110px;
padding: 25px;
border: 1px solid black;
margin: 5px;
} -
30.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine<br>Roses are red<br>Rivers flow</p> -
31.⚖️ What colour is the text of this element?
<h2 class="note" id="intro">Hi</h2>
CSS:
h2 { color: orange; }
h2 { color: green; } (a) blue (b) green (c) orange (d) white - 32.💬 How does an HTML comment end? (a) --> (b) // (c) >> (d) */
- 33.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h6> or <h1>? (a) <h4> (b) <h6> (c) <h1> (d) <h5>
-
34.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 9; i++) {
total = total + 9;
}
console.log(total); - 35.🔢 In a basic web page file, which comes first: “<html>” or “</body>”? (a) <html> (b) </body>
- 36.True or false: HTML on its own can make headings. (a) True (b) False
- 37.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
-
38.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (min-width: 600px) {
p {
font-size: 22px;
}
} - 39.True or false: “use headings in order” helps everyone use the page. (a) True (b) False
- 40.🌗 Is white on black easy or hard to read? (a) hard to read (b) easy to read
Answer key
- font-weight
- picks the font style
- <head>
- purple
- in the body
- No
- 5
- False
- an element selector
- it tells its meaning
- inside a <tr>
- Maths fun
- 20
- /*
- Take the quiz
- makes a form box
- turns HTML into a page
- not safe
- <h5>
- 80
- 200
- line 3
- 3
- hides what you type
- bullets
- 3
- True
- if
- 162
- 4
- green
- -->
- <h1>
- 81
- <html>
- True
- a line across the page
- 22
- True
- easy to read
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids