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.True or false: <header> holds extra side notes. (a) True (b) False
-
2.📊 How many cells does this table have in all?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
<tr><td>Papaya</td><td>Grapes</td><td>Litchi</td></tr>
<tr><td>Jamun</td><td>Guava</td><td>Orange</td></tr>
</table> -
3.⚡ What does this code print? (Look at the quotes!)
let x = "5";
let y = 7;
console.log(x + y); (a) 57 (b) 12 (c) Error - 4.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
- 5.True or false: <ul> goes in the head. (a) True (b) False
-
6.🔍 Which line is missing its closing tag?
line 1: <p>Cricket is fun.</p>
line 2: <strong>Fun facts</strong>
line 3: <i>The red kite (a) line 1 (b) line 2 (c) line 3 -
7.📱 The screen is 820px wide. Does the rule inside @media apply?
p {
font-size: 20px;
}
@media (min-width: 600px) {
p {
font-size: 24px;
}
} (a) No (b) Yes -
8.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 110px;
padding: 10px;
border: 3px solid black;
margin: 5px;
} -
9.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 260px;
justify-content: space-between;
}
Inside are 3 boxes, each 40px wide (no margins). - 10.⚖️ Which selector is the weakest? (a) an id selector (b) an element selector (c) a class selector
- 11.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h5> (d) <h3>
- 12.Which colour pair is easy to read? (a) red on green (b) pink on red (c) dark grey on white (d) yellow on white
-
13.🔁 How many numbers does this code print?
for (let i = 0; i < 8; i = i + 2) {
console.log(i);
} -
14.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Kites fly high</p> -
15.♿ Is this heading order correct (no level skipped)?
<h1> → <h2> → <h3> → <h4> (a) Yes (b) No - 16.Which of these is true of <article>? (a) holds one blog post (b) holds the menu of links (c) holds copyright notes (d) holds the main content
-
17.🌍 What is the path in this URL?
https://www.example.net/maths/tables.html (a) www.example.net (b) /index.html (c) /maths/tables.html (d) https - 18.True or false: the browser scrambles data on its way. (a) True (b) False
- 19.True or false: <h1> has a closing tag. (a) True (b) False
- 20.📄 Can HTML on its own make tables? (a) No (b) Yes
-
21.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="250"> - 22.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h5> or <h1>? (a) <h5> (b) <h4> (c) <h1> (d) <h6>
-
23.⚡ What does this code print? (Look at the quotes!)
let x = "5";
let y = 9;
console.log(x + y); (a) 14 (b) 59 (c) Error - 24.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a hash # (d) a dot .
- 25.True or false: the border is the line round the box. (a) False (b) True
-
26.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) cake.jpg (b) A happy dog (c) Birthday cake (d) width -
27.⚖️ What colour is the text of this element?
<h2 class="note" id="top">Hi</h2>
CSS:
.note { color: blue; }
#top { color: yellow; } (a) black (b) white (c) blue (d) yellow - 28.🔁 What does i++ do? (a) doubles i (b) takes 1 from i (c) adds 1 to i (d) prints i
- 29.🎯 Which sign starts a class selector? (a) & (b) # (c) . (d) @
- 30.🔠 Which tag is the least important heading? (a) <h1> (b) <h6> (c) <h3> (d) <p>
-
31.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Litchi</li>
<li>Banana</li>
</ol> (a) bullets (b) numbers -
32.🔍 One closing tag is missing. Which one?
<h1>I love mangoes.</h1>
<h2>My best friend</h2>
<p>Good morning! (a) </small> (b) </h1> (c) </h2> (d) </p> - 33.Which of these is an opening tag? (a) </body> (b) <li> (c) </h1> (d) </p>
-
34.📊 How many rows does this table have?
<table>
<tr><td>Mango</td><td>Papaya</td><td>Jamun</td><td>Mango</td></tr>
<tr><td>Guava</td><td>Jamun</td><td>Jamun</td><td>Guava</td></tr>
<tr><td>Papaya</td><td>Guava</td><td>Orange</td><td>Orange</td></tr>
</table> -
35.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 4; i++) {
total = total + 8;
}
console.log(total); - 36.What is <input type="radio"> for? (a) picks a day (b) lets you pick only one (c) lets you tick many (d) is for an email address
-
37.🔗 Where does this link open?
<a href="about.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab - 38.🌈 Which colour of light is strongest in rgb(5, 162, 82)? (a) blue (b) red (c) green
- 39.📱 min-width: 800px applies when the screen is ___. (a) 800px or narrower (b) exactly 100px (c) turned off (d) 800px or wider
- 40.💬 How does an HTML comment start? (a) /* (b) # (c) <!-- (d) //
Answer key
- False
- 9
- 57
- False
- False
- line 3
- Yes
- 146
- 70
- an element selector
- <h1>
- dark grey on white
- 4
- 2
- Yes
- holds one blog post
- /maths/tables.html
- False
- True
- Yes
- 250
- <h6>
- 59
- a slash /
- True
- Birthday cake
- yellow
- adds 1 to i
- .
- <h6>
- numbers
- </p>
- <li>
- 3
- 32
- lets you pick only one
- in a new tab
- green
- 800px or wider
- <!--
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids