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 selector is the weakest? (a) a class selector (b) an id selector (c) an element selector
- 2.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <img> (d) <link>
- 3.✍️ CSS declarations go inside which brackets? (a) [ ] (b) < > (c) ( ) (d) { }
- 4.True or false: <title> goes in the head. (a) True (b) False
- 5.True or false: “link text “click here”” makes the page harder to use. (a) True (b) False
- 6.True or false: to put secrets in comments is not safe. (a) False (b) True
- 7.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
8.⚖️ What colour is the text of this element?
<h1 class="menu" id="end">Hi</h1>
CSS:
h1 { color: green; }
.menu { color: blue; } (a) green (b) black (c) purple (d) blue -
9.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Good morning!</p>
<!-- <p>My pets</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>My best friend</p> --> -
10.🔒 Is the connection to this address scrambled (encrypted)?
https://kids.example.org/games/chess.html (a) No (b) Yes - 11.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
-
12.✍️ What value is given to width in this rule?
li {
font-weight: bold;
color: red;
width: 300px;
font-size: 20px;
} (a) width (b) 300px (c) italic (d) red -
13.🔁 What does this code print?
let temp = 11;
if (temp > 20) {
console.log("Hot");
} else {
console.log("Cool");
} (a) Hot (b) Cool -
14.⚖️ What colour is the text of this element?
<p class="box" id="logo">Hi</p>
CSS:
#logo { color: purple; }
p { color: yellow; }
.box { color: black; } (a) purple (b) black (c) yellow (d) green -
15.📊 How many rows does this table have?
<table>
<tr><td>Jamun</td><td>Grapes</td></tr>
<tr><td>Mango</td><td>Litchi</td></tr>
<tr><td>Guava</td><td>Orange</td></tr>
<tr><td>Grapes</td><td>Mango</td></tr>
</table> -
16.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> -->
<p>Fun facts</p> - 17.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
- 18.💬 How does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
-
19.📊 How many cells are in each row?
<table>
<tr><th>Name</th><th>Fruit</th></tr>
<tr><td>Grapes</td><td>Litchi</td></tr>
</table> - 20.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
21.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> - 22.🏷️ Which is the closing tag for <strong>? (a) <\strong> (b) <strong> (c) </strong> (d) <strong/>
-
23.📋 What number does the browser show next to “Jamun”?
<ol start="4">
<li>Guava</li>
<li>Orange</li>
<li>Jamun</li>
<li>Mango</li>
<li>Papaya</li>
<li>Litchi</li>
</ol> -
24.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 40px;
padding: 10px;
border: 4px solid black;
margin: 0px;
} -
25.🔗 Where does this link open?
<a href="contact.html">Maths fun</a> (a) in the same tab (b) in a new tab - 26.True or false: <caption> makes one data cell. (a) False (b) True
- 27.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
28.🎯 Which CSS selector matches this element?
<span class="menu" id="hero">Hello</span> (a) p (b) .menu (c) .hero (d) #menu -
29.✍️ What value is given to background-color in this rule?
.note {
color: red;
background-color: yellow;
} (a) 10px (b) yellow (c) 8px (d) background-color -
30.🌍 What is the protocol in this URL?
https://www.example.com/about.html (a) www.example.com (b) http (c) https (d) /about.html - 31.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) the first one (c) neither (d) the later one
- 32.🔁 Which loop repeats code a set number of times? (a) else (b) if (c) let (d) for
-
33.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> (a) kite.png (b) tiger.jpg (c) map.png (d) A tiger asleep -
34.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (max-width: 768px) {
p {
font-size: 16px;
}
} - 35.🔍 Which is the odd one out? (a) turns HTML into a page (b) opens web pages for us (c) colours code to help us (d) shows pages from the web
-
36.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 280px;
padding: 15px;
border: 1px solid black;
margin: 15px;
} - 37.🧭 Is <footer> semantic or not semantic? (a) not semantic (b) semantic
-
38.⚖️ What colour is the text of this element?
<h2 class="menu" id="main">Hi</h2>
CSS:
.menu { color: orange; }
h2 { color: black; } (a) orange (b) purple (c) black (d) red - 39.🌈 In #00004a the blue part is the hex number 4a. What is it as a normal number?
-
40.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
p {
font-size: 24px;
}
@media (max-width: 768px) {
p {
font-size: 20px;
}
}
Answer key
- an element selector
- <a>
- { }
- True
- True
- True
- a closing tag
- blue
- 2
- Yes
- Yes
- 300px
- Cool
- purple
- 4
- 4
- a web browser
- <!--
- 2
- Yes
- 400
- </strong>
- 6
- 68
- in the same tab
- False
- an opening tag
- .menu
- yellow
- https
- the later one
- for
- tiger.jpg
- 16
- colours code to help us
- 312
- semantic
- orange
- 74
- 20
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids