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 one asks for a web page? (a) the URL (b) HTTPS (c) the server (d) the browser
-
2.🖌️ Where does the text sit on its line?
h1 {
font-size: 20px;
text-align: right;
background-color: black;
color: purple;
} (a) on the left (b) on the right (c) in the middle - 3.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
- 4.What does font-family do? (a) sets the letter colour (b) picks the font style (c) colours behind the text (d) makes the text bold
- 5.Which of these has a closing tag? (a) <meta> (b) <br> (c) <hr> (d) <title>
-
6.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>My pets</p>
<!-- <p>Fun facts</p> -->
<p>I love mangoes.</p> - 7.True or false: to use a strong password is safe. (a) True (b) False
- 8.Which colour pair is easy to read? (a) pink on red (b) yellow on white (c) black on white (d) light grey on white
- 9.📄 Can HTML on its own pick a random number? (a) No (b) Yes
-
10.📊 How many rows does this table have?
<table>
<tr><td>Banana</td><td>Papaya</td><td>Banana</td><td>Jamun</td></tr>
<tr><td>Guava</td><td>Jamun</td><td>Jamun</td><td>Litchi</td></tr>
</table> - 11.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h2> or <h6>? (a) <h2> (b) <h6> (c) <h5> (d) <h4>
-
12.🔁 What is the LAST number this code prints?
for (let i = 0; i < 18; i = i + 3) {
console.log(i);
} -
13.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 9; i++) {
total = total + i;
}
console.log(total); - 14.Which of these is a closing tag? (a) </p> (b) <b> (c) <body> (d) <p>
-
15.🖌️ Where does the text sit on its line?
h2 {
font-size: 40px;
text-align: center;
background-color: red;
color: white;
} (a) on the left (b) on the right (c) in the middle - 16.♿ A part of the page is under a <h1> heading. Which tag should its sub-heading use? (a) <h2> (b) <h1> (c) <h4> (d) <h5>
- 17.🎯 How many elements on a page should have the same id? (a) 5 (b) any number (c) 1 (d) 2
- 18.True or false: <table> goes in the body. (a) False (b) True
-
19.✍️ What value is given to text-align in this rule?
.box {
width: 300px;
text-align: center;
background-color: yellow;
} (a) center (b) text-align (c) yellow (d) 10px - 20.🧩 Which language lays out the page? (a) JavaScript (b) HTML (c) CSS
- 21.📦 In the box model, which part is space inside the border? (a) margin (b) padding (c) content (d) border
- 22.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
- 23.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
24.⚡ What number does this code print?
let a = 4;
let b = 2;
console.log(a * b); -
25.✍️ What is the selector in this CSS rule?
#top {
font-size: 20px;
padding: 8px;
} (a) 8px (b) font-size (c) li (d) #top - 26.What does background-color do? (a) sets the letter colour (b) centres a heading (c) makes letters bigger (d) colours behind the text
-
27.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (min-width: 1024px) {
p {
font-size: 14px;
}
} - 28.📊 In a table, which tag is a row? (a) <td> (b) <th> (c) <tb> (d) <tr>
- 29.True or false: the border is the line round the box. (a) True (b) False
- 30.Which of these is true of <header>? (a) holds a news story (b) sits at the bottom (c) is the page’s key part (d) holds the logo and title
- 31.♿ What does good colour contrast mean? (a) many bright colours (b) only red text (c) no colours at all (d) text stands out clearly
-
32.📊 How many rows does this table have?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
<tr><td>Guava</td><td>Mango</td><td>Papaya</td><td>Grapes</td></tr>
<tr><td>Banana</td><td>Mango</td><td>Orange</td><td>Orange</td></tr>
</table> -
33.🔗 Which words do you click on?
<a href="quiz.html">Maths fun</a> (a) quiz.html (b) Maths fun (c) Art corner (d) href - 34.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <h1> (d) <br>
- 35.True or false: the URL is the page’s address. (a) False (b) True
- 36.True or false: <p> goes in the body. (a) False (b) True
- 37.📦 In the box model, which part is the text or picture? (a) margin (b) padding (c) border (d) content
-
38.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Banana</li>
</ol> (a) numbers (b) bullets -
39.🔗 Where does this link open?
<a href="maths.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab - 40.What does font-weight do? (a) centres a heading (b) sets the letter colour (c) makes the text bold (d) makes letters bigger
Answer key
- the browser
- on the right
- 255
- picks the font style
- <title>
- 2
- True
- black on white
- No
- 2
- <h6>
- 15
- 45
- </p>
- in the middle
- <h2>
- 1
- True
- center
- CSS
- padding
- in the head
- an opening tag
- 8
- #top
- colours behind the text
- 14
- <tr>
- True
- holds the logo and title
- text stands out clearly
- 3
- Maths fun
- <h1>
- True
- True
- content
- numbers
- in a new tab
- makes the text bold
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids