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.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="checkbox" name="colour"> Green
<input type="checkbox" name="colour"> Red
<input type="checkbox" name="colour"> Pink
</form> - 2.🧩 Which language checks a quiz answer? (a) JavaScript (b) HTML (c) CSS
-
3.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
p {
font-size: 24px;
}
@media (max-width: 480px) {
p {
font-size: 22px;
}
} - 4.📝 What does <hr> draw? (a) a table (b) a line across the page (c) a link (d) a picture
- 5.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
- 6.♿ Who uses a screen reader? (a) people who are blind (b) only coders (c) only robots (d) only teachers
- 7.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
- 8.True or false: <ul> goes in the body. (a) False (b) True
- 9.What does font-weight do? (a) makes the text bold (b) centres a heading (c) colours behind the text (d) sets the letter colour
-
10.⚖️ What colour is the text of this element?
<p class="red" id="main">Hi</p>
CSS:
.red { color: orange; }
p { color: black; }
#main { color: green; } (a) yellow (b) orange (c) black (d) green - 11.Which of these is true of a code editor? (a) turns HTML into a page (b) shows pages from the web (c) shows line numbers (d) hosts websites online
- 12.✍️ In color: blue; which part is the property? (a) ; (b) color (c) blue (d) :
- 13.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h1>? (a) <h4> (b) <h6> (c) <h1> (d) <h3>
- 14.🔗 Which attribute holds the address of a link? (a) src (b) id (c) alt (d) href
- 15.♿ Does this help everyone, or make the page harder to use: label every form box? (a) helps everyone (b) makes it harder
- 16.🔍 Which is the odd one out? (a) checks a quiz answer (b) lays out the page (c) reacts to a button click (d) changes the page live
-
17.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>My drawings</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) My drawings (b) index.html (c) We won by 5 runs. (d) Riya’s Recipes - 18.♿ A part of the page is under a <h1> heading. Which tag should its sub-heading use? (a) <h6> (b) <h1> (c) <h3> (d) <h2>
-
19.✍️ How many declarations (property: value pairs) are in this rule?
li {
font-size: 20px;
padding: 8px;
} - 20.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h1> or <h6>? (a) <h2> (b) <h1> (c) <h6> (d) <h3>
-
21.📱 The screen is 1100px wide. Does the rule inside @media apply?
p {
font-size: 16px;
}
@media (min-width: 480px) {
p {
font-size: 20px;
}
} (a) Yes (b) No - 22.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <head> (d) <!DOCTYPE html>
- 23.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <body> (c) <head> (d) <!DOCTYPE html>
- 24.✍️ Which sign ends each CSS declaration? (a) . (b) , (c) ; (d) :
-
25.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow<br>Stars shine<br>Kites fly high</p> -
26.🔁 What does this code print?
let age = 21;
if (age >= 16) {
console.log("teen");
} else {
console.log("child");
} (a) child (b) teen - 27.💪 Which justify-content value puts boxes in the middle? (a) flex-start (b) flex-end (c) space-between (d) center
- 28.🔢 On a typical page, from top to bottom, what comes right after “<nav>”? (a) <footer> (b) <main> (c) <header>
-
29.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 80px;
padding: 5px;
border: 4px solid black;
margin: 5px;
} -
30.⚡ What does this code show?
let name = "Riya";
alert("Hello, " + name + "!"); (a) Riya (b) Hello, Riya! (c) Hello, name! (d) name -
31.🖌️ What colour is behind the letters?
h1 {
color: orange;
background-color: black;
text-align: right;
font-size: 40px;
} (a) orange (b) black (c) purple -
32.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="radio" name="colour"> Pink
<input type="radio" name="colour"> Orange
<input type="radio" name="colour"> Red
</form> -
33.⚖️ What colour is the text of this element?
<h1 class="note" id="logo">Hi</h1>
CSS:
.note { color: orange; }
.note { color: black; } (a) orange (b) purple (c) yellow (d) black -
34.✍️ Which property is set to 8px in this rule?
body {
color: red;
padding: 8px;
} (a) 8px (b) border (c) font-weight (d) padding -
35.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 180px;
justify-content: space-between;
}
Inside are 2 boxes, each 80px wide (no margins). - 36.Which of these is true of a web browser? (a) has an address bar (b) stores a website’s files (c) hosts websites online (d) is where we type code
-
37.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Jamun</li>
</ul> (a) numbers (b) bullets -
38.🖌️ What colour is behind the letters?
h2 {
color: green;
text-align: right;
background-color: black;
font-size: 16px;
} (a) purple (b) black (c) green -
39.🔗 Where does this link open?
<a href="about.html">Visit the site</a> (a) in the same tab (b) in a new tab - 40.🎨 Which attribute adds CSS inside one tag? (a) style (b) alt (c) src (d) href
Answer key
- 3
- JavaScript
- 24
- a line across the page
- on the browser tab
- people who are blind
- in the head
- True
- makes the text bold
- green
- shows line numbers
- color
- <h6>
- href
- helps everyone
- lays out the page
- Riya’s Recipes
- <h2>
- 2
- <h6>
- Yes
- <!DOCTYPE html>
- </html>
- ;
- 4
- teen
- center
- <main>
- 108
- Hello, Riya!
- black
- 1
- black
- padding
- 20
- has an address bar
- bullets
- black
- in the same tab
- style
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids