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 hex code is cyan? (a) #ff0000 (b) #00ff00 (c) #ffff00 (d) #00ffff
-
2.🔗 Which address opens when you click this link?
<a href="contact.html">Play games</a> (a) https://example.com (b) contact.html (c) Play games (d) maths.html -
3.📊 How many rows does this table have?
<table>
<tr><td>Banana</td><td>Jamun</td><td>Jamun</td><td>Mango</td></tr>
<tr><td>Orange</td><td>Orange</td><td>Jamun</td><td>Banana</td></tr>
<tr><td>Mango</td><td>Jamun</td><td>Guava</td><td>Litchi</td></tr>
</table> -
4.🎯 Which CSS selector matches this element?
<p class="red" id="hero">Hello</p> (a) #red (b) .hero (c) .box (d) p - 5.Which of these is not safe to do online? (a) check for https first (b) keep passwords secret (c) use a strong password (d) download from pop-ups
- 6.True or false: HTML on its own can add up two numbers. (a) False (b) True
- 7.📝 Which input type sends the form? (a) text (b) password (c) submit (d) number
-
8.⚖️ What colour is the text of this element?
<h1 class="star" id="main">Hi</h1>
CSS:
#main { color: blue; }
#main { color: purple; } (a) green (b) purple (c) orange (d) blue -
9.📝 How many <input> tags are in this form?
<form>
<input type="password">
<input type="date">
<input type="number">
<input type="text">
<input type="submit" value="Send">
</form> - 10.🌈 Which hex code is magenta? (a) #ffff00 (b) #00ff00 (c) #000000 (d) #ff00ff
-
11.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="checkbox" name="fruit"> Litchi
<input type="checkbox" name="fruit"> Mango
<input type="checkbox" name="fruit"> Guava
</form> - 12.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) width (d) height
- 13.📊 Where do <td> cells go? (a) inside a <p> (b) inside the <head> (c) inside a <tr> (d) inside a <li>
-
14.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Good morning!</p>
<p>My best friend</p>
<!-- <p>Hello, world!</p> --> (a) Hello, world! (b) Good morning! (c) I love mangoes. (d) My best friend -
15.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>I love mangoes.</p> -->
<p>Our school trip</p> (a) My best friend (b) I love mangoes. (c) Our school trip -
16.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="checkbox" name="sport"> Kabaddi
<input type="checkbox" name="sport"> Cricket
<input type="checkbox" name="sport"> Chess
<input type="checkbox" name="sport"> Football
<input type="checkbox" name="sport"> Hockey
</form> - 17.True or false: a web browser opens web pages for us. (a) True (b) False
- 18.True or false: HTML on its own can keep a high score. (a) True (b) False
-
19.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<!-- <p>My best friend</p> -->
<p>Hello, world!</p> (a) I love mangoes. (b) Cricket is fun. (c) My best friend (d) Hello, world! - 20.True or false: <caption> holds the whole table. (a) True (b) False
-
21.⚡ What does this code print? (Look at the quotes!)
let x = "3";
let y = 8;
console.log(x + y); (a) 38 (b) 11 (c) Error - 22.🎨 Which tag connects an outside CSS file? (a) <css> (b) <img> (c) <link> (d) <a>
-
23.🔁 How many times does this code print “Welcome”?
for (let i = 3; i <= 9; i++) {
console.log("Welcome");
} - 24.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the shorter one (c) the first one (d) the later one
- 25.♿ Does this help everyone, or make the page harder to use: label every form box? (a) makes it harder (b) helps everyone
-
26.🔁 How many times does this code print “Hi”?
for (let i = 2; i < 5; i++) {
console.log("Hi");
} -
27.🖌️ What colour is behind the letters?
h2 {
background-color: red;
color: purple;
font-size: 24px;
text-align: left;
} (a) red (b) purple (c) white - 28.What does font-weight do? (a) centres a heading (b) colours behind the text (c) makes the text bold (d) makes letters bigger
- 29.🌈 Which colour is #ffff00? (a) magenta (b) yellow (c) blue (d) red
-
30.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h3>Rain today</h3>
<p>Hello, world!</p>
<h2>The red kite</h2>
<p>Hello, world!</p> - 31.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) High Tech (c) Home Text (d) HyperText
- 32.📊 Which tag gives the table a title? (a) <th> (b) <td> (c) <caption> (d) <table>
- 33.📊 Which tag holds the whole table? (a) <tr> (b) <td> (c) <th> (d) <table>
- 34.True or false: a code editor sends pages over the net. (a) False (b) True
- 35.Which of these is a closing tag? (a) <title> (b) <li> (c) </title> (d) <h1>
-
36.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 320px;
justify-content: flex-start;
}
Inside are 3 boxes, each 80px wide (no margins). - 37.🌈 Which hex code is red? (a) #0000ff (b) #ffff00 (c) #ffffff (d) #ff0000
- 38.📄 Can HTML on its own make links to pages? (a) No (b) Yes
- 39.📝 Which input type takes only numbers? (a) text (b) number (c) checkbox (d) submit
- 40.🛡️ Should you share your password with your best friend? (a) Yes (b) No
Answer key
- #00ffff
- contact.html
- 3
- p
- download from pop-ups
- False
- submit
- purple
- 5
- #ff00ff
- 3
- height
- inside a <tr>
- Hello, world!
- I love mangoes.
- 5
- True
- False
- My best friend
- False
- 38
- <link>
- 7
- the later one
- helps everyone
- 3
- red
- makes the text bold
- yellow
- 3
- HyperText
- <caption>
- <table>
- False
- </title>
- 80
- #ff0000
- Yes
- number
- No
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids