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.🔐 Is Chai$Cup_19x a strong or a weak password? (a) weak (b) strong
- 2.🔗 Which attribute holds the address of a link? (a) id (b) href (c) src (d) alt
- 3.What does color do? (a) picks the font style (b) sets the letter colour (c) makes the text bold (d) centres a heading
-
4.📱 The screen is 414px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (min-width: 600px) {
p {
font-size: 22px;
}
} -
5.📱 The screen is 320px wide. Does the rule inside @media apply?
p {
font-size: 24px;
}
@media (max-width: 1024px) {
p {
font-size: 22px;
}
} (a) No (b) Yes -
6.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 60px;
padding: 5px;
border: 2px solid black;
margin: 5px;
} - 7.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <p> (d) <img>
- 8.💬 How does an HTML comment start? (a) <!-- (b) // (c) /* (d) #
- 9.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to colour it (c) to load it faster (d) to make it bigger
-
10.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (min-width: 768px) {
p {
font-size: 24px;
}
} - 11.✍️ Which sign goes between a property and its value? (a) : (b) = (c) ; (d) -
-
12.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>The red kite</p> -->
<p>My pets</p> - 13.🔢 In a basic web page file, which comes LAST? (a) <body> (b) </html> (c) <!DOCTYPE html> (d) </body>
-
14.🌍 What is the path in this URL?
http://learn.example.com/art/gallery.html (a) learn.example.com (b) /news/today.html (c) http (d) /art/gallery.html - 15.📋 Which list tag is an ordered list? (a) <ul> (b) <ol> (c) <li>
-
16.🖌️ Where does the text sit on its line?
h2 {
color: yellow;
background-color: blue;
font-size: 24px;
text-align: left;
} (a) in the middle (b) on the left (c) on the right -
17.⚡ What does this code print? (Look at the quotes!)
let x = "3";
let y = 7;
console.log(x + y); (a) 37 (b) Error (c) 10 - 18.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dot . (d) a dollar $
- 19.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) neither (c) the first one (d) the later one
-
20.🔁 How many times does this code print “Hi”?
for (let i = 0; i <= 6; i++) {
console.log("Hi");
} - 21.🚀 Which file should this code go in: <p>Hello!</p> (a) style.css (b) index.html (c) script.js
-
22.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>My pets</p>
<p>Our school trip</p>
<p>Fun facts</p> (a) Fun facts (b) My pets (c) Our school trip (d) Hello, world! -
23.✍️ How many declarations (property: value pairs) are in this rule?
.box {
color: red;
width: 300px;
} - 24.📦 In the box model, which part is the line round the box? (a) content (b) margin (c) padding (d) border
- 25.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
- 26.💬 Does the browser show comments on the page? (a) No (b) Yes
- 27.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 28.🔢 On a typical page, from top to bottom, which comes LAST? (a) <main> (b) <header> (c) <footer> (d) <nav>
- 29.🔍 Which is the odd one out? (a) stores a website’s files (b) sends pages over the net (c) shows line numbers (d) answers page requests
-
30.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) width (b) Our school bus (c) bus.jpg (d) An old fort -
31.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Guava</li>
<li>Jamun</li>
<li>Orange</li>
<li>Banana</li>
<li>Litchi</li>
</ol> - 32.🧭 Why use <nav> instead of <div> for a menu? (a) it loads faster (b) it makes text red (c) it tells its meaning (d) it adds pictures
- 33.Which of these is not safe to do online? (a) think before you post (b) use a nickname in games (c) share your password (d) keep passwords secret
- 34.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a src="about.html">
-
35.📊 How many cells does this table have in all?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
<tr><td>Papaya</td><td>Mango</td><td>Papaya</td><td>Litchi</td></tr>
</table> - 36.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
-
37.✍️ How many declarations (property: value pairs) are in this rule?
p {
color: red;
text-align: center;
width: 300px;
} - 38.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) <head> (c) <!DOCTYPE html> (d) </html>
- 39.True or false: <title> goes in the head. (a) False (b) True
- 40.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
Answer key
- strong
- href
- sets the letter colour
- 20
- Yes
- 84
- <a>
- <!--
- to describe the image
- 16
- :
- 2
- </html>
- /art/gallery.html
- <ol>
- on the left
- 37
- a slash /
- the later one
- 7
- index.html
- Hello, world!
- 2
- border
- Yes
- No
- in the head
- <footer>
- shows line numbers
- Our school bus
- 6
- it tells its meaning
- share your password
- <a href="about.html">
- 8
- a web browser
- 3
- <!DOCTYPE html>
- True
- a closing tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids