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.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 240px;
justify-content: space-between;
}
Inside are 3 boxes, each 60px wide (no margins). -
2.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 280px;
padding: 20px;
border: 5px solid black;
margin: 5px;
} - 3.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
-
4.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 170px;
justify-content: space-between;
}
Inside are 3 boxes, each 50px wide (no margins). - 5.🌈 In #c00000 the red part is the hex number c0. What is it as a normal number?
-
6.🔍 Which line is missing its closing tag?
line 1: <small>Hello, world!</small>
line 2: <u>I love mangoes.
line 3: <h3>Rain today</h3> (a) line 1 (b) line 2 (c) line 3 - 7.📝 What does <p> make? (a) a picture (b) a table (c) a link (d) a paragraph
- 8.💪 Which flexbox property picks row or column? (a) gap (b) justify-content (c) flex-direction (d) align-items
-
9.🔗 Which address opens when you click this link?
<a href="quiz.html">Visit the site</a> (a) games.html (b) quiz.html (c) Visit the site (d) about.html -
10.🔗 Which words do you click on?
<a href="contact.html">Visit the site</a> (a) href (b) Visit the site (c) Maths fun (d) contact.html -
11.🔗 Where does this link open?
<a href="https://example.com">About us</a> (a) in the same tab (b) in a new tab - 12.🧭 Why use <nav> instead of <div> for a menu? (a) it adds pictures (b) it loads faster (c) it tells its meaning (d) it makes text red
- 13.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h4> or <h3>? (a) <h1> (b) <h3> (c) <h5> (d) <h4>
-
14.🌍 What is the protocol in this URL?
https://www.example.com/news/today.html (a) www.example.com (b) https (c) /news/today.html (d) http -
15.📱 The screen is 1100px wide. Does the rule inside @media apply?
p {
font-size: 16px;
}
@media (max-width: 768px) {
p {
font-size: 14px;
}
} (a) No (b) Yes - 16.🖌️ Which CSS property makes the text bold? (a) background-color (b) font-size (c) font-weight (d) color
-
17.⚖️ What colour is the text of this element?
<p class="red" id="end">Hi</p>
CSS:
.red { color: white; }
#end { color: orange; }
p { color: purple; } (a) red (b) purple (c) white (d) orange -
18.📝 How many <input> tags are in this form?
<form>
<input type="text">
<input type="password">
<input type="submit" value="Send">
</form> - 19.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
-
20.⚡ What number does this code print?
let a = 33;
let b = 16;
console.log(a - b); -
21.🔗 Which words do you click on?
<a href="contact.html">Play games</a> (a) contact.html (b) href (c) About us (d) Play games -
22.⚖️ What colour is the text of this element?
<p class="big" id="end">Hi</p>
CSS:
.big { color: red; }
#end { color: purple; }
p { color: blue; } (a) purple (b) blue (c) yellow (d) red - 23.🧭 Who is helped most by semantic tags? (a) screen-reader users (b) only the printer (c) only the server (d) nobody
- 24.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
-
25.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Banana</li>
</ul> (a) numbers (b) bullets - 26.🌐 Which one sends pages over the net? (a) a code editor (b) a web server (c) a web browser
- 27.🚀 Which file should this code go in: <p>Hello!</p> (a) index.html (b) script.js (c) style.css
- 28.📄 Can HTML on its own make links to pages? (a) Yes (b) No
- 29.Which of these is an empty tag? (a) <h1> (b) <br> (c) <p> (d) <li>
-
30.📱 The screen is 1366px wide. Does the rule inside @media apply?
p {
font-size: 24px;
}
@media (max-width: 600px) {
p {
font-size: 20px;
}
} (a) Yes (b) No - 31.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h4>? (a) <h1> (b) <h2> (c) <h4> (d) <h6>
-
32.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Banana</li>
</ol> -
33.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) tiger.jpg (b) kite.png (c) map.png (d) A tiger asleep - 34.Which of these is safe to do online? (a) check for https first (b) share your OTP (c) type a password on http (d) put secrets in comments
- 35.⚡ Which tag holds JavaScript in a page? (a) <script> (b) <js> (c) <code> (d) <style>
- 36.📛 In <a href="x.html">, what is href? (a) an attribute (b) an element name (c) a closing tag (d) a comment
-
37.📝 How many <input> tags are in this form?
<form>
<input type="email">
<input type="checkbox">
<input type="password">
<input type="submit" value="Send">
</form> -
38.⚡ What does this code print? (Look at the quotes!)
let x = "3";
let y = 1;
console.log(x + y); (a) 4 (b) Error (c) 31 -
39.⚖️ What colour is the text of this element?
<h2 class="note" id="end">Hi</h2>
CSS:
.note { color: white; }
h2 { color: blue; }
#end { color: green; } (a) white (b) blue (c) purple (d) green - 40.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
Answer key
- 30
- 330
- <!DOCTYPE html>
- 10
- 192
- line 2
- a paragraph
- flex-direction
- quiz.html
- Visit the site
- in the same tab
- it tells its meaning
- <h1>
- https
- No
- font-weight
- orange
- 3
- <ol>
- 17
- Play games
- purple
- screen-reader users
- <ul>
- bullets
- a web server
- index.html
- Yes
- <br>
- No
- <h1>
- 2
- tiger.jpg
- check for https first
- <script>
- an attribute
- 4
- 31
- green
- an opening tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids