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.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 300px;
justify-content: flex-end;
}
Inside are 3 boxes, each 80px wide (no margins). -
2.🖌️ Where does the text sit on its line?
h1 {
font-size: 40px;
text-align: center;
color: red;
background-color: blue;
} (a) on the right (b) on the left (c) in the middle - 3.🚀 Which file should this code go in: body { margin: 0; } (a) script.js (b) index.html (c) style.css
-
4.🔍 One closing tag is missing. Which one?
<h3>Hello, world!</h3>
<i>I love mangoes.</i>
<em>Cricket is fun. (a) </h3> (b) </p> (c) </i> (d) </em> - 5.True or false: .menu is a class selector. (a) False (b) True
-
6.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
p {
font-size: 24px;
}
@media (max-width: 1024px) {
p {
font-size: 20px;
}
} -
7.📊 How many cells does this table have in all?
<table>
<tr><td>Jamun</td><td>Jamun</td></tr>
<tr><td>Papaya</td><td>Jamun</td></tr>
<tr><td>Papaya</td><td>Papaya</td></tr>
<tr><td>Litchi</td><td>Papaya</td></tr>
</table> - 8.🎨 Which tag connects an outside CSS file? (a) <link> (b) <img> (c) <css> (d) <a>
- 9.True or false: <li> lists steps in order. (a) False (b) True
-
10.🖌️ What colour are the letters?
h2 {
color: orange;
font-size: 16px;
text-align: left;
background-color: purple;
} (a) purple (b) orange (c) blue - 11.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
- 12.📝 Which tag makes a big box for many lines of text? (a) <p> (b) <textarea> (c) <br> (d) <input>
-
13.⚡ What number does this code print?
let a = 46;
let b = 8;
console.log(a - b); - 14.🎯 Which sign starts an id selector? (a) & (b) @ (c) . (d) #
- 15.True or false: “images with no alt” makes the page harder to use. (a) False (b) True
-
16.🔗 Which words do you click on?
<a href="contact.html">Maths fun</a> (a) Art corner (b) Maths fun (c) href (d) contact.html - 17.🔢 On a typical page, from top to bottom, which comes LAST? (a) <header> (b) <footer> (c) <nav> (d) <main>
-
18.📋 Does this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Litchi</li>
<li>Orange</li>
</ol> (a) numbers (b) bullets -
19.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (max-width: 480px) {
p {
font-size: 14px;
}
} - 20.True or false: HTML on its own cannot show paragraphs. (a) False (b) True
- 21.🌗 Is black on white easy or hard to read? (a) hard to read (b) easy to read
-
22.⚡ What does this code print? (Look at the quotes!)
let x = "1";
let y = 6;
console.log(x + y); (a) 7 (b) Error (c) 16 -
23.⚖️ What colour is the text of this element?
<h2 class="note" id="end">Hi</h2>
CSS:
#end { color: green; }
#end { color: orange; } (a) purple (b) blue (c) green (d) orange -
24.🔗 Which words do you click on?
<a href="maths.html">Maths fun</a> (a) href (b) Art corner (c) maths.html (d) Maths fun - 25.True or false: <main> holds a side box of tips. (a) False (b) True
- 26.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
27.🔗 Where does this link open?
<a href="games.html">Play games</a> (a) in a new tab (b) in the same tab -
28.🔗 Where does this link open?
<a href="games.html">Art corner</a> (a) in a new tab (b) in the same tab -
29.📊 How many rows does this table have?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
<tr><td>Litchi</td><td>Grapes</td><td>Banana</td></tr>
</table> -
30.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) The full moon (b) dog.jpg (c) A happy dog (d) width -
31.📝 How many <input> tags are in this form?
<form>
<input type="checkbox">
<input type="text">
<input type="email">
<input type="submit" value="Send">
</form> -
32.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="radio" name="sport"> Chess
<input type="radio" name="sport"> Cricket
<input type="radio" name="sport"> Football
</form> -
33.🔗 Where does this link open?
<a href="maths.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab - 34.Which of these is true of <header>? (a) holds copyright notes (b) holds the main content (c) sits at the very top (d) helps you move around
-
35.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red</p> - 36.True or false: <p> is an empty tag. (a) True (b) False
- 37.🛡️ Online: is it safe to put secrets in comments? (a) not safe (b) safe
- 38.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <ul> (d) <p>
- 39.🔐 Is Kite_Fl1es@Dawn a strong or a weak password? (a) weak (b) strong
- 40.Which of these does HTML do? (a) puts a picture on a page (b) changes the text size (c) changes the page live (d) shows a pop-up message
Answer key
- 60
- in the middle
- style.css
- </em>
- True
- 20
- 8
- <link>
- False
- orange
- 6
- <textarea>
- 38
- #
- True
- Maths fun
- <footer>
- numbers
- 14
- False
- easy to read
- 16
- orange
- Maths fun
- False
- has a closing tag
- in the same tab
- in the same tab
- 2
- A happy dog
- 4
- 1
- in a new tab
- sits at the very top
- 2
- False
- not safe
- <li>
- strong
- puts a picture on a page
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids