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.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 3; i++) {
total = total + 3;
}
console.log(total); - 2.🚀 Which file is best for code that reacts to clicks? (a) style.css (b) index.html (c) script.js (d) notes.txt
- 3.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
-
4.🖌️ What colour are the letters?
li {
background-color: red;
font-size: 28px;
text-align: right;
color: white;
} (a) red (b) yellow (c) white - 5.🎯 What kind of selector is .menu? (a) an id selector (b) a class selector (c) an element selector
- 6.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
- 7.✍️ Which sign goes between a property and its value? (a) ; (b) = (c) - (d) :
-
8.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Welcome! (b) Thanks for visiting. (c) My Hobbies (d) index.html - 9.Which of these is true of a web browser? (a) is where we type code (b) saves our .html files (c) shows pages from the web (d) colours code to help us
- 10.🎯 What kind of selector is .card? (a) a class selector (b) an element selector (c) an id selector
-
11.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 230px;
justify-content: flex-end;
}
Inside are 3 boxes, each 60px wide (no margins). -
12.🖌️ What colour are the letters?
p {
color: purple;
background-color: black;
text-align: center;
font-size: 16px;
} (a) purple (b) green (c) black -
13.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>Fun facts</p>
<!-- <p>Rain today</p> -->
<p>The red kite</p> (a) Our school trip (b) Fun facts (c) Rain today (d) The red kite - 14.What does font-size do? (a) colours behind the text (b) sets the letter colour (c) picks the font style (d) makes letters bigger
- 15.What does justify-content: center do? (a) puts boxes in the middle (b) packs boxes at the start (c) packs boxes at the end (d) equal gaps, none at ends
- 16.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
- 17.🔁 When does the else part run? (a) never (b) when if is true (c) when if is false (d) always
- 18.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
-
19.🔒 Is the connection to this address scrambled (encrypted)?
http://school.example.in/games/chess.html (a) Yes (b) No - 20.🏷️ Which is the closing tag for <em>? (a) <em/> (b) <\em> (c) <em> (d) </em>
- 21.⚖️ Which selector is the weakest? (a) an id selector (b) an element selector (c) a class selector
- 22.🚀 Which file should this code go in: <p>Hello!</p> (a) index.html (b) script.js (c) style.css
- 23.Which of these does HTML do? (a) checks a quiz answer (b) makes a link (c) reacts to a button click (d) counts down a timer
- 24.📝 Which tag gives a form box a name you can click? (a) <h1> (b) <hr> (c) <label> (d) <title>
- 25.True or false: in <img>, height names the picture file. (a) False (b) True
- 26.Which of these is an empty tag? (a) <li> (b) <title> (c) <h1> (d) <br>
- 27.⚖️ Which selector is the strongest? (a) an element selector (b) a class selector (c) an id selector
-
28.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Litchi</li>
<li>Orange</li>
</ol> (a) bullets (b) numbers - 29.🔢 On a typical page, from top to bottom, which comes LAST? (a) <nav> (b) <footer> (c) <main> (d) <header>
- 30.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) a comment (d) an attribute
- 31.🎯 Which sign starts a class selector? (a) @ (b) . (c) & (d) #
- 32.True or false: JavaScript changes the text size. (a) True (b) False
- 33.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h4>? (a) <h5> (b) <h4> (c) <h3> (d) <h1>
-
34.🔗 Which words do you click on?
<a href="maths.html">Art corner</a> (a) href (b) Art corner (c) maths.html (d) School news -
35.📊 How many cells does this table have in all?
<table>
<tr><th>Name</th><th>Fruit</th></tr>
<tr><td>Banana</td><td>Papaya</td></tr>
<tr><td>Papaya</td><td>Grapes</td></tr>
</table> - 36.🌐 Which one turns HTML into a page? (a) a code editor (b) a web server (c) a web browser
- 37.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 38.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h6>? (a) <h6> (b) <h3> (c) <h1> (d) <h4>
- 39.🖌️ Which CSS property sets the letter colour? (a) font-weight (b) font-size (c) text-align (d) color
-
40.📋 What number does the browser show next to “Grapes”?
<ol start="2">
<li>Banana</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Orange</li>
<li>Mango</li>
</ol>
Answer key
- 9
- script.js
- blue
- white
- a class selector
- Yes
- :
- My Hobbies
- shows pages from the web
- a class selector
- 50
- purple
- Rain today
- makes letters bigger
- puts boxes in the middle
- 255
- when if is false
- Yes
- No
- </em>
- an element selector
- index.html
- makes a link
- <label>
- False
- <br>
- an id selector
- numbers
- <footer>
- an attribute
- .
- False
- <h1>
- Art corner
- 6
- a web browser
- has a closing tag
- <h6>
- color
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids