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 heading shows the BIGGEST text: <h1>, <h6>, <h4> or <h2>? (a) <h2> (b) <h4> (c) <h1> (d) <h6>
- 2.🔢 When you open a web page, which comes LAST? (a) the browser asks it (b) the server sends files (c) the browser shows it (d) you type the URL
-
3.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Rivers flow<br>Roses are red</p> - 4.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) src (d) id
-
5.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h3>Rain today</h3>
<p>Fun facts</p> - 6.Which of these is padding? (a) the gap to other boxes (b) space outside the border (c) space inside the border (d) a solid or dotted edge
- 7.🎯 Which element does the selector div style? (a) <span> (b) <div class="note"> (c) <h1 id="main"> (d) <p class="note">
- 8.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
-
9.🔗 Where does this link open?
<a href="news.html" target="_blank">Art corner</a> (a) in a new tab (b) in the same tab - 10.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h5>? (a) <h1> (b) <h2> (c) <h3> (d) <h5>
-
11.📋 How many items does this list show?
<ol>
<li>Grapes</li>
<li>Papaya</li>
</ol> -
12.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 270px;
padding: 15px;
border: 1px solid black;
margin: 20px;
} - 13.True or false: CSS puts a picture on a page. (a) False (b) True
- 14.🎯 Which sign starts a class selector? (a) # (b) & (c) . (d) @
-
15.🔗 Where does this link open?
<a href="contact.html" target="_blank">About us</a> (a) in a new tab (b) in the same tab -
16.📊 How many heading cells (<th>) does this table have?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
<tr><td>Mango</td><td>Mango</td><td>Banana</td></tr>
</table> - 17.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) white (c) blue (d) cyan
- 18.True or false: <table> holds the whole table. (a) False (b) True
-
19.📊 How many heading cells (<th>) does this table have?
<table>
<tr><th>Name</th><th>Fruit</th></tr>
<tr><td>Jamun</td><td>Mango</td></tr>
<tr><td>Orange</td><td>Mango</td></tr>
</table> -
20.🔁 How many times does this code print “Well done”?
for (let i = 0; i < 5; i++) {
console.log("Well done");
} - 21.🌈 Which colour is #ffff00? (a) white (b) cyan (c) blue (d) yellow
-
22.🔁 What is the LAST number this code prints?
for (let i = 0; i < 12; i = i + 2) {
console.log(i);
} - 23.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h6>? (a) <h6> (b) <h4> (c) <h1> (d) <h5>
-
24.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (max-width: 600px) {
p {
font-size: 10px;
}
} - 25.🌍 Which one stores the site’s files? (a) HTTPS (b) the URL (c) the server (d) the browser
- 26.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 27.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
-
28.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> (a) A tiger asleep (b) kite.png (c) tiger.jpg (d) map.png -
29.🔁 What does this code print?
let score = 14;
if (score < 20) {
console.log("You win");
} else {
console.log("Play again");
} (a) Play again (b) You win - 30.💪 Which justify-content value packs boxes at the end? (a) flex-end (b) flex-start (c) center (d) space-between
-
31.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Good morning!</p>
<p>Our school trip</p> -
32.🌍 What is the path in this URL?
https://learn.example.com/maths/tables.html (a) learn.example.com (b) https (c) /index.html (d) /maths/tables.html - 33.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) yellow (c) red (d) blue
- 34.🔠 Which tag is the least important heading? (a) <h1> (b) <h6> (c) <h3> (d) <p>
- 35.🌈 Which colour of light is strongest in rgb(127, 94, 217)? (a) red (b) green (c) blue
-
36.🔍 Which line is missing its closing tag?
line 1: <i>Fun facts
line 2: <strong>I love mangoes.</strong>
line 3: <em>Our school trip</em> (a) line 3 (b) line 2 (c) line 1 - 37.📝 Which input type takes only numbers? (a) number (b) text (c) submit (d) date
- 38.💪 Which justify-content value packs boxes at the start? (a) flex-start (b) flex-end (c) space-between (d) center
-
39.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>I love mangoes.</p>
<h2>I love mangoes.</h2>
<h2>Cricket is fun.</h2>
<p>Fun facts</p> - 40.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to describe the image (d) to colour it
Answer key
- <h1>
- the browser shows it
- 3
- href
- 2
- space inside the border
- <div class="note">
- in the body
- in a new tab
- <h1>
- 2
- 342
- False
- .
- in a new tab
- 3
- black
- True
- 2
- 5
- yellow
- 10
- <h6>
- 12
- the server
- in the head
- False
- tiger.jpg
- You win
- flex-end
- 1
- /maths/tables.html
- white
- <h6>
- blue
- line 1
- number
- flex-start
- 3
- to describe the image
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids