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.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
2.⚡ What number does this code print?
let score = 5;
score = score + 16;
score = score - 10;
console.log(score); - 3.True or false: alert(score); goes in style.css. (a) False (b) True
- 4.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
- 5.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
-
6.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>My pets</h2>
<h2>Fun facts</h2>
<p>Good morning!</p>
<h2>My best friend</h2> -
7.🔗 Where does this link open?
<a href="quiz.html">School news</a> (a) in the same tab (b) in a new tab - 8.📄 What is the first line of an HTML5 page? (a) <head> (b) <!DOCTYPE html> (c) <html> (d) <body>
-
9.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="400"> (a) map.png (b) A red kite (c) cake.jpg (d) kite.png - 10.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
- 11.Which of these is not safe to do online? (a) use a strong password (b) think before you post (c) type a password on http (d) keep passwords secret
- 12.🌈 Which hex code is white? (a) #ffffff (b) #00ff00 (c) #ff00ff (d) #ff0000
-
13.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Sky is blue<br>Kites fly high</p> -
14.⚡ What number does this code print?
let a = 56;
let b = 23;
console.log(a - b); - 15.📝 Which tag holds a whole form? (a) <ol> (b) <table> (c) <input> (d) <form>
-
16.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>Rain today</p>
<!-- <p>Fun facts</p> -->
<p>My pets</p> - 17.🔁 When does the else part run? (a) when if is true (b) never (c) when if is false (d) always
-
18.📊 How many heading cells (<th>) does this table have?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
<tr><td>Orange</td><td>Papaya</td><td>Orange</td><td>Grapes</td></tr>
<tr><td>Grapes</td><td>Orange</td><td>Litchi</td><td>Jamun</td></tr>
<tr><td>Banana</td><td>Litchi</td><td>Litchi</td><td>Banana</td></tr>
</table> - 19.🌗 Is black on white easy or hard to read? (a) hard to read (b) easy to read
- 20.True or false: <main> holds extra side notes. (a) False (b) True
-
21.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p> -
22.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (min-width: 480px) {
p {
font-size: 22px;
}
} - 23.Which of these is an empty tag? (a) <br> (b) <ul> (c) <h1> (d) <li>
- 24.🔢 On a typical page, from top to bottom, what comes right after “<nav>”? (a) <header> (b) <main> (c) <footer>
- 25.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h1> or <h2>? (a) <h6> (b) <h3> (c) <h1> (d) <h2>
-
26.🌍 What is the protocol in this URL?
https://school.example.in/about.html (a) school.example.in (b) http (c) https (d) /about.html -
27.✍️ Which property is set to 2px solid in this rule?
li {
border: 2px solid;
width: 300px;
color: red;
} (a) border (b) font-style (c) 2px solid (d) width -
28.🔗 Which words do you click on?
<a href="https://example.com">Play games</a> (a) href (b) Play games (c) https://example.com (d) About us - 29.🧭 Which semantic tag sits at the very top? (a) <aside> (b) <nav> (c) <header> (d) <footer>
- 30.✍️ CSS declarations go inside which brackets? (a) [ ] (b) < > (c) ( ) (d) { }
-
31.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue<br>Birds sing</p> - 32.True or false: <title> goes in the head. (a) True (b) False
-
33.📊 How many rows does this table have?
<table>
<tr><td>Mango</td><td>Litchi</td><td>Litchi</td></tr>
<tr><td>Grapes</td><td>Litchi</td><td>Grapes</td></tr>
<tr><td>Jamun</td><td>Orange</td><td>Guava</td></tr>
<tr><td>Litchi</td><td>Mango</td><td>Grapes</td></tr>
</table> -
34.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (max-width: 480px) {
p {
font-size: 16px;
}
} - 35.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) ( (d) <
- 36.Which colour pair is easy to read? (a) light grey on white (b) red on green (c) white on dark blue (d) yellow on white
-
37.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Space Facts (b) body (c) Thanks for visiting. (d) Easy snacks - 38.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
- 39.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a closing tag (d) a comment
- 40.⚖️ Which selector is the weakest? (a) a class selector (b) an element selector (c) an id selector
Answer key
- Yes
- 11
- False
- blue
- in the body
- 2
- in the same tab
- <!DOCTYPE html>
- kite.png
- F
- type a password on http
- #ffffff
- 3
- 33
- <form>
- 3
- when if is false
- 4
- easy to read
- False
- 1
- 16
- <br>
- <main>
- <h1>
- https
- border
- Play games
- <header>
- { }
- 3
- True
- 4
- 20
- <
- white on dark blue
- Easy snacks
- <a href="about.html">
- an attribute
- an element selector
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids