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.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) black (d) blue
-
2.⚖️ What colour is the text of this element?
<h2 class="star" id="top">Hi</h2>
CSS:
.star { color: red; }
.star { color: blue; } (a) white (b) red (c) orange (d) blue - 3.✍️ How does a CSS comment start? (a) // (b) /* (c) # (d) <!--
- 4.Which colour pair is easy to read? (a) red on green (b) yellow on white (c) white on black (d) pink on red
-
5.🔁 What does this code print?
let score = 35;
if (score >= 34) {
console.log("You win");
} else {
console.log("Play again");
} (a) Play again (b) You win - 6.🌐 Which one hosts websites online? (a) a web server (b) a web browser (c) a code editor
-
7.📊 How many cells does this table have in all?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
<tr><td>Litchi</td><td>Guava</td><td>Guava</td></tr>
<tr><td>Grapes</td><td>Mango</td><td>Banana</td></tr>
<tr><td>Papaya</td><td>Banana</td><td>Jamun</td></tr>
</table> - 8.True or false: the content is a solid or dotted edge. (a) True (b) False
- 9.📊 Which tag makes one table row? (a) <table> (b) <td> (c) <caption> (d) <tr>
-
10.🔗 Which address opens when you click this link?
<a href="about.html">Play games</a> (a) contact.html (b) about.html (c) Play games (d) https://example.com -
11.🔗 Where does this link open?
<a href="games.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab - 12.🔢 When you open a web page, what comes right after “DNS finds the server”? (a) the browser asks it (b) the browser shows it (c) the server sends files (d) you type the URL
-
13.🔁 How many times does this code print “Well done”?
for (let i = 1; i < 4; i++) {
console.log("Well done");
} -
14.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (min-width: 600px) {
p {
font-size: 24px;
}
} -
15.🔗 Where does this link open?
<a href="news.html" target="_blank">About us</a> (a) in a new tab (b) in the same tab - 16.📦 In the box model, which part is space inside the border? (a) padding (b) border (c) content (d) margin
-
17.📋 What number does the browser show next to “Litchi”?
<ol>
<li>Orange</li>
<li>Grapes</li>
<li>Litchi</li>
<li>Banana</li>
</ol> - 18.True or false: the border is space inside the border. (a) True (b) False
- 19.✍️ In color: blue; which part is the property? (a) color (b) blue (c) ; (d) :
- 20.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
21.🔍 One closing tag is missing. Which one?
<p>Good morning!</p>
<b>My best friend
<i>My pets</i> (a) </p> (b) </i> (c) </h2> (d) </b> -
22.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>My best friend</p>
<!-- <p>Good morning!</p> --> (a) My best friend (b) Good morning! (c) Our school trip - 23.📊 Which tag gives the table a title? (a) <caption> (b) <table> (c) <tr> (d) <th>
- 24.💪 Which flexbox property spaces boxes along a row? (a) flex-direction (b) gap (c) justify-content (d) align-items
-
25.🔍 Which line is missing its closing tag?
line 1: <b>My best friend</b>
line 2: <small>My pets</small>
line 3: <u>Good morning! (a) line 3 (b) line 2 (c) line 1 - 26.Which colour pair is hard to read? (a) blue on purple (b) white on dark blue (c) yellow on black (d) dark grey on white
-
27.📋 What number does the browser show next to “Papaya”?
<ol start="7">
<li>Guava</li>
<li>Mango</li>
<li>Papaya</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Grapes</li>
</ol> -
28.📊 How many rows does this table have?
<table>
<tr><td>Litchi</td><td>Grapes</td><td>Banana</td><td>Banana</td></tr>
<tr><td>Guava</td><td>Grapes</td><td>Orange</td><td>Guava</td></tr>
</table> - 29.🌗 Is yellow on black easy or hard to read? (a) hard to read (b) easy to read
- 30.🔍 Which is the odd one out? (a) has an address bar (b) shows line numbers (c) opens web pages for us (d) shows pages from the web
- 31.Which of these is not safe to do online? (a) log out on shared PCs (b) tell a trusted adult (c) share your OTP (d) use a nickname in games
-
32.🔗 Which words do you click on?
<a href="https://example.com">Take the quiz</a> (a) href (b) Take the quiz (c) Play games (d) https://example.com - 33.🎯 Which element does the selector p style? (a) <h2 class="note"> (b) <p class="note"> (c) <li id="top"> (d) <h1>
- 34.🧭 Why use <nav> instead of <div> for a menu? (a) it tells its meaning (b) it makes text red (c) it adds pictures (d) it loads faster
- 35.Which of these is safe to do online? (a) share your password (b) click prize links (c) share your OTP (d) think before you post
- 36.🚀 Where in index.html does the link to style.css go? (a) after </html> (b) inside a <p> (c) in the head (d) in the footer
- 37.True or false: in <img>, alt names the picture file. (a) False (b) True
- 38.Which of these is the content? (a) the gap round content (b) space outside the border (c) space inside the border (d) the text or picture
-
39.🌍 What is the protocol in this URL?
http://learn.example.com/art/gallery.html (a) https (b) /art/gallery.html (c) http (d) learn.example.com - 40.What does font-family do? (a) makes letters bigger (b) picks the font style (c) centres a heading (d) colours behind the text
Answer key
- red
- blue
- /*
- white on black
- You win
- a web server
- 12
- False
- <tr>
- about.html
- in a new tab
- the browser asks it
- 3
- 24
- in a new tab
- padding
- 3
- False
- color
- has a closing tag
- </b>
- Good morning!
- <caption>
- justify-content
- line 3
- blue on purple
- 9
- 2
- easy to read
- shows line numbers
- share your OTP
- Take the quiz
- <p class="note">
- it tells its meaning
- think before you post
- in the head
- False
- the text or picture
- http
- picks the font style
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids