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.True or false: console.log(5 + 2); goes in script.js. (a) False (b) True
-
2.🔍 One closing tag is missing. Which one?
<h1>The red kite</h1>
<small>Good morning!
<h2>Rain today</h2> (a) </h2> (b) </small> (c) </h1> (d) </p> -
3.✍️ Which property is set to 10px in this rule?
.note {
margin: 10px;
font-style: italic;
} (a) 10px (b) margin (c) font-weight (d) padding -
4.🔍 One closing tag is missing. Which one?
<h3>Hello, world!</h3>
<h2>My pets
<h1>My best friend</h1> (a) </h3> (b) </i> (c) </h2> (d) </h1> -
5.✍️ How many declarations (property: value pairs) are in this rule?
body {
padding: 8px;
border: 2px solid;
color: red;
} -
6.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 120px;
padding: 30px;
border: 5px solid black;
margin: 5px;
} - 7.True or false: to ask before downloading is safe. (a) False (b) True
- 8.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h2> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h3>
- 9.🔍 Which is the odd one out? (a) sets colours and fonts (b) adds space around boxes (c) changes the text size (d) checks a quiz answer
-
10.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="100"> (a) Birthday cake (b) width (c) map.png (d) Map of India - 11.True or false: <link rel="stylesheet"> goes in the head. (a) False (b) True
-
12.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Jamun</li>
<li>Grapes</li>
</ul> (a) numbers (b) bullets -
13.⚖️ What colour is the text of this element?
<p class="menu" id="top">Hi</p>
CSS:
#top { color: yellow; }
#top { color: orange; } (a) white (b) black (c) yellow (d) orange -
14.⚡ What number does this code print?
let apples = 7;
apples = apples + 9;
apples = apples - 14;
console.log(apples); - 15.💪 Which flexbox property sets space between boxes? (a) align-items (b) flex-direction (c) justify-content (d) gap
- 16.🔢 To build and share your first web page, which comes FIRST? (a) write the HTML (b) add CSS styles (c) plan what to show (d) test in a browser
- 17.⚖️ Which selector is the weakest? (a) an element selector (b) an id selector (c) a class selector
-
18.⚖️ What colour is the text of this element?
<h2 class="big" id="end">Hi</h2>
CSS:
h2 { color: blue; }
h2 { color: green; } (a) purple (b) black (c) blue (d) green - 19.True or false: <br> has a closing tag. (a) True (b) False
- 20.📱 max-width: 600px applies when the screen is ___. (a) 600px or narrower (b) 600px or wider (c) turned off (d) exactly 1000px
- 21.True or false: <hr> has a closing tag. (a) True (b) False
- 22.🎯 Can many elements share the same class? (a) Yes (b) No
- 23.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) white (d) red
- 24.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ol> (d) <ul>
-
25.🔁 What does this code print?
let age = 8;
if (age < 18) {
console.log("teen");
} else {
console.log("child");
} (a) teen (b) child -
26.🌍 What is the path in this URL?
http://www.example.com/maths/tables.html (a) /index.html (b) /maths/tables.html (c) http (d) www.example.com - 27.⚡ Which JavaScript word repeats code? (a) for (b) console.log() (c) if (d) let
- 28.💪 Which flexbox property turns on flexbox? (a) gap (b) flex-direction (c) display: flex (d) justify-content
- 29.💪 Which justify-content value packs boxes at the start? (a) flex-end (b) flex-start (c) space-between (d) center
- 30.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) <h1/> (c) <h1> (d) </h1>
-
31.✍️ Which property is set to 20px in this rule?
#top {
font-size: 20px;
padding: 8px;
} (a) 20px (b) text-align (c) font-size (d) background-color - 32.📝 Which input type lets you tick many? (a) submit (b) text (c) checkbox (d) email
- 33.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
- 34.🌈 Which colour of light is strongest in rgb(159, 74, 52)? (a) blue (b) green (c) red
- 35.🧭 Is <div> semantic or not semantic? (a) not semantic (b) semantic
-
36.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 150px;
justify-content: flex-start;
}
Inside are 3 boxes, each 40px wide (no margins). -
37.📱 The screen is 320px wide. Does the rule inside @media apply?
p {
font-size: 24px;
}
@media (max-width: 1024px) {
p {
font-size: 22px;
}
} (a) No (b) Yes -
38.✍️ Which property is set to 10px in this rule?
h1 {
text-align: center;
padding: 8px;
margin: 10px;
width: 300px;
} (a) 10px (b) margin (c) font-weight (d) padding - 39.🛡️ Online: is it safe to put secrets in comments? (a) safe (b) not safe
-
40.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="300">
Answer key
- True
- </small>
- margin
- </h2>
- 3
- 200
- True
- <h1>
- checks a quiz answer
- Map of India
- True
- bullets
- orange
- 2
- gap
- plan what to show
- an element selector
- green
- False
- 600px or narrower
- False
- Yes
- blue
- <ol>
- teen
- /maths/tables.html
- for
- display: flex
- flex-start
- </h1>
- font-size
- checkbox
- True
- red
- not semantic
- 30
- Yes
- margin
- not safe
- 300
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids