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.🔢 When you open a web page, which comes first: “the server sends files” or “the browser asks it”? (a) the server sends files (b) the browser asks it
- 2.🔢 To build and share your first web page, what comes right after “plan what to show”? (a) write the HTML (b) test in a browser (c) publish it online (d) add CSS styles
-
3.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (max-width: 768px) {
p {
font-size: 10px;
}
} -
4.🔁 How many times does this code print “Welcome”?
for (let i = 1; i <= 6; i++) {
console.log("Welcome");
} - 5.🔢 To build and share your first web page, what comes right after “add CSS styles”? (a) write the HTML (b) publish it online (c) plan what to show (d) test in a browser
- 6.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h3>? (a) <h2> (b) <h3> (c) <h1> (d) <h5>
- 7.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to make it bigger (d) to describe the image
- 8.🌗 Is white on dark blue easy or hard to read? (a) hard to read (b) easy to read
- 9.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) starts a new line (d) makes a list
- 10.🔁 Which loop repeats code a set number of times? (a) for (b) else (c) if (d) let
- 11.Which of these goes in the body? (a) <title> (b) <style> (c) <h1> (d) <link rel="stylesheet">
- 12.True or false: in <img>, width names the picture file. (a) True (b) False
- 13.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
14.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 220px;
justify-content: flex-start;
}
Inside are 2 boxes, each 80px wide (no margins). - 15.True or false: HTTPS scrambles data on its way. (a) False (b) True
- 16.🏷️ Which is the closing tag for <u>? (a) <u> (b) <\u> (c) </u> (d) <u/>
- 17.⚡ Which tag holds JavaScript in a page? (a) <style> (b) <script> (c) <js> (d) <code>
- 18.🔁 What does i++ do? (a) takes 1 from i (b) doubles i (c) prints i (d) adds 1 to i
-
19.⚖️ What colour is the text of this element?
<h1 class="big" id="main">Hi</h1>
CSS:
.big { color: orange; }
#main { color: purple; }
h1 { color: black; } (a) blue (b) purple (c) orange (d) black - 20.🔢 To build and share your first web page, which comes first: “write the HTML” or “add CSS styles”? (a) write the HTML (b) add CSS styles
-
21.🔗 Where does this link open?
<a href="quiz.html">Play games</a> (a) in the same tab (b) in a new tab - 22.🔢 When you open a web page, which comes first: “the server sends files” or “DNS finds the server”? (a) DNS finds the server (b) the server sends files
-
23.📝 How many <input> tags are in this form?
<form>
<input type="email">
<input type="number">
<input type="submit" value="Send">
</form> -
24.🔍 One closing tag is missing. Which one?
<b>Hello, world!
<h3>My pets</h3>
<h2>Our school trip</h2> (a) </b> (b) </small> (c) </h3> (d) </h2> - 25.🔍 Which is the odd one out? (a) turns HTML into a page (b) shows pages from the web (c) has an address bar (d) shows line numbers
-
26.🔁 What is the LAST number this code prints?
for (let i = 0; i < 6; i = i + 4) {
console.log(i);
} - 27.Which of these is a strong password? (a) password (b) Kite_Fl1es@Dawn (c) iloveyou (d) abcd1234
- 28.♿ A part of the page is under a <h5> heading. Which tag should its sub-heading use? (a) <h3> (b) <h1> (c) <h6> (d) <h2>
-
29.🖌️ Where does the text sit on its line?
h2 {
text-align: right;
color: green;
background-color: orange;
font-size: 20px;
} (a) on the right (b) in the middle (c) on the left -
30.✍️ What is the selector in this CSS rule?
.box {
font-style: italic;
width: 300px;
padding: 8px;
} (a) .box (b) h2 (c) font-style (d) 300px -
31.🔗 Which address opens when you click this link?
<a href="https://example.com">School news</a> (a) School news (b) https://example.com (c) art.html (d) maths.html - 32.📄 Can HTML on its own make tables? (a) No (b) Yes
-
33.🔗 Where does this link open?
<a href="quiz.html">About us</a> (a) in the same tab (b) in a new tab - 34.🌈 Which hex code is cyan? (a) #0000ff (b) #00ff00 (c) #00ffff (d) #ff00ff
-
35.🔁 What does this code print?
let marks = 29;
if (marks >= 20) {
console.log("Pass");
} else {
console.log("Try again");
} (a) Pass (b) Try again - 36.🎨 One CSS file can style how many pages? (a) only one word (b) many pages (c) only one image (d) no pages
- 37.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a hash # (d) a slash /
- 38.True or false: in <img>, alt shows if the image fails. (a) False (b) True
- 39.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) width (d) height
-
40.🔗 Which words do you click on?
<a href="contact.html">About us</a> (a) href (b) contact.html (c) Contact us (d) About us
Answer key
- the browser asks it
- write the HTML
- 12
- 6
- test in a browser
- <h1>
- to describe the image
- easy to read
- starts a new line
- for
- <h1>
- False
- has a closing tag
- 60
- True
- </u>
- <script>
- adds 1 to i
- purple
- write the HTML
- in the same tab
- DNS finds the server
- 3
- </b>
- shows line numbers
- 4
- Kite_Fl1es@Dawn
- <h6>
- on the right
- .box
- https://example.com
- Yes
- in the same tab
- #00ffff
- Pass
- many pages
- a slash /
- True
- alt
- About us
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids