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 many headings are in this code?
<h1>Hello, world!</h1>
<p>Our school trip</p>
<p>Our school trip</p>
<p>Hello, world!</p> - 2.What does justify-content: space-between do? (a) equal gaps, none at ends (b) puts boxes in the middle (c) packs boxes at the end (d) packs boxes at the start
- 3.🌈 In #00c500 the green part is the hex number c5. What is it as a normal number?
- 4.🔁 When does the else part run? (a) when if is true (b) always (c) never (d) when if is false
- 5.⚡ What does JavaScript add to a web page? (a) actions and changes (b) the domain name (c) the page title (d) only colours
- 6.Which of these goes in the head? (a) <h1> (b) <a> (c) <img> (d) <meta charset="utf-8">
- 7.📊 Which tag makes one table row? (a) <table> (b) <caption> (c) <th> (d) <tr>
-
8.🔁 What does this code print?
let temp = 31;
if (temp > 18) {
console.log("Hot");
} else {
console.log("Cool");
} (a) Cool (b) Hot -
9.🔗 Where does this link open?
<a href="https://example.com">Contact us</a> (a) in a new tab (b) in the same tab - 10.🎯 Which element does the selector #top style? (a) <h1 class="box"> (b) <p class="top"> (c) <p id="intro"> (d) <p id="top">
- 11.🔢 On a typical page, from top to bottom, what comes right after “<header>”? (a) <footer> (b) <main> (c) <nav>
- 12.🌈 Which hex code is black? (a) #ff00ff (b) #000000 (c) #ffffff (d) #ff0000
- 13.True or false: HTML on its own cannot make bullet lists. (a) True (b) False
-
14.⚡ What number does this code print?
let marks = 22;
marks = marks + 19;
marks = marks - 4;
console.log(marks); -
15.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="checkbox" name="colour"> Red
<input type="checkbox" name="colour"> Pink
<input type="checkbox" name="colour"> Orange
</form> - 16.🚀 Which file should this code go in: <ul><li>Art</li></ul> (a) script.js (b) style.css (c) index.html
- 17.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
-
18.⚖️ What colour is the text of this element?
<h1 class="note" id="logo">Hi</h1>
CSS:
.note { color: white; }
#logo { color: red; }
h1 { color: purple; } (a) orange (b) white (c) red (d) purple - 19.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">
-
20.📱 The screen is 700px wide. Does the rule inside @media apply?
p {
font-size: 16px;
}
@media (max-width: 600px) {
p {
font-size: 14px;
}
} (a) Yes (b) No -
21.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>Rain today</h2>
<p>Good morning!</p> - 22.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
23.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p>
<p>Rain today</p> (a) Rain today (b) I love mangoes. (c) Good morning! - 24.📝 Which input type is for one line of words? (a) email (b) password (c) text (d) checkbox
- 25.Which of these does HTML do? (a) makes headings and lists (b) rounds box corners (c) checks a quiz answer (d) adds space around boxes
- 26.True or false: <input type="password"> picks a day. (a) False (b) True
- 27.🏷️ Which is the closing tag for <i>? (a) <\i> (b) </i> (c) <i/> (d) <i>
- 28.Which of these is an opening tag? (a) </h1> (b) </p> (c) </li> (d) <h1>
- 29.True or false: the border is the line round the box. (a) False (b) True
-
30.📊 How many cells are in each row?
<table>
<tr><td>Orange</td><td>Banana</td><td>Jamun</td></tr>
<tr><td>Litchi</td><td>Mango</td><td>Papaya</td></tr>
<tr><td>Jamun</td><td>Grapes</td><td>Guava</td></tr>
</table> -
31.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>I love mangoes.</p>
<!-- <p>My pets</p> -->
<p>Good morning!</p> -
32.🌍 What is the domain name in this URL?
https://kids.example.org/index.html (a) kids.example.org (b) https (c) /index.html (d) school.example.in - 33.True or false: <meta> is an empty tag. (a) False (b) True
- 34.🔢 To build and share your first web page, which comes first: “write the HTML” or “add CSS styles”? (a) add CSS styles (b) write the HTML
- 35.🔁 What does i++ do? (a) doubles i (b) adds 1 to i (c) prints i (d) takes 1 from i
-
36.🖌️ What colour are the letters?
li {
color: yellow;
font-size: 24px;
background-color: red;
text-align: left;
} (a) red (b) purple (c) yellow - 37.🎯 Which element does the selector .box style? (a) <p id="box"> (b) <p class="box"> (c) <p class="star"> (d) <h1 class="menu">
-
38.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Match report</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) We won by 5 runs. (b) Riya’s Recipes (c) index.html (d) Match report -
39.🔗 Which words do you click on?
<a href="quiz.html">School news</a> (a) href (b) quiz.html (c) Take the quiz (d) School news - 40.🖼️ Does <img> need a closing tag? (a) No (b) Yes
Answer key
- 1
- equal gaps, none at ends
- 197
- when if is false
- actions and changes
- <meta charset="utf-8">
- <tr>
- Hot
- in the same tab
- <p id="top">
- <nav>
- #000000
- False
- 37
- 3
- index.html
- <!--
- red
- <a href="about.html">
- No
- 2
- a closing tag
- Good morning!
- text
- makes headings and lists
- False
- </i>
- <h1>
- True
- 3
- 3
- kids.example.org
- True
- write the HTML
- adds 1 to i
- yellow
- <p class="box">
- Riya’s Recipes
- School news
- No
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids