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.📊 Are <th> cells shown bold and centred by default? (a) No (b) Yes
- 2.✍️ CSS declarations go inside which brackets? (a) [ ] (b) { } (c) ( ) (d) < >
- 3.Which of these is true of a code editor? (a) answers page requests (b) saves our .html files (c) sends pages over the net (d) hosts websites online
-
4.🖌️ What colour are the letters?
h2 {
background-color: purple;
color: green;
font-size: 28px;
text-align: right;
} (a) black (b) green (c) purple - 5.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 6.Which of these is the border? (a) space inside the border (b) the text or picture (c) the gap to other boxes (d) the line round the box
- 7.🚀 Which file should this code go in: score = score + 1; (a) script.js (b) style.css (c) index.html
-
8.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>The red kite</h2>
<h2>Cricket is fun.</h2>
<h2>Hello, world!</h2> - 9.Which of these is the content? (a) the text or picture (b) a solid or dotted edge (c) space outside the border (d) the gap to other boxes
-
10.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 240px;
padding: 30px;
border: 4px solid black;
margin: 20px;
} -
11.🔗 Which address opens when you click this link?
<a href="news.html">Play games</a> (a) games.html (b) Play games (c) news.html (d) quiz.html - 12.🔗 What does HyperText mean? (a) text in colour (b) very big text (c) secret text (d) text with links
- 13.Which of these is not safe to do online? (a) use a strong password (b) click prize links (c) tell a trusted adult (d) ask before downloading
- 14.📦 In the box model, which part is space inside the border? (a) content (b) padding (c) margin (d) border
-
15.🖌️ What colour are the letters?
h2 {
font-size: 40px;
color: blue;
background-color: red;
text-align: right;
} (a) red (b) black (c) blue -
16.🎯 Which CSS selector matches this element?
<div class="box" id="end">Hello</div> (a) .end (b) .star (c) .box (d) #hero - 17.🚀 Which file should this code go in: <img src="cat.png"> (a) script.js (b) index.html (c) style.css
-
18.⚡ What number does this code print?
let apples = 23;
apples = apples + 13;
apples = apples - 25;
console.log(apples); - 19.⚡ Which JavaScript word runs code when true? (a) let (b) console.log() (c) alert() (d) if
- 20.What does justify-content: center do? (a) packs boxes at the start (b) equal gaps, none at ends (c) puts boxes in the middle (d) packs boxes at the end
- 21.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <link about.html>
- 22.🎯 What kind of selector is .big? (a) an id selector (b) an element selector (c) a class selector
-
23.✍️ What is the selector in this CSS rule?
.note {
font-size: 20px;
padding: 8px;
} (a) #top (b) font-size (c) 8px (d) .note - 24.🌗 Is white on dark blue easy or hard to read? (a) easy to read (b) hard to read
- 25.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 26.⚖️ Which selector is the weakest? (a) an element selector (b) an id selector (c) a class selector
- 27.What is <input type="checkbox"> for? (a) hides what you type (b) sends the form (c) picks a day (d) lets you tick many
-
28.✍️ How many declarations (property: value pairs) are in this rule?
p {
text-align: center;
} - 29.True or false: .note is a class selector. (a) True (b) False
-
30.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>Good morning!</h2>
<h2>Our school trip</h2> - 31.Which of these is an opening tag? (a) </p> (b) </body> (c) <body> (d) </title>
-
32.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="150"> - 33.True or false: HTTPS shows the page to you. (a) True (b) False
- 34.💪 Which justify-content value puts boxes in the middle? (a) space-between (b) flex-start (c) center (d) flex-end
- 35.🔍 Which is the odd one out? (a) shows line numbers (b) is where we type code (c) colours code to help us (d) hosts websites online
- 36.🧭 Why use <nav> instead of <div> for a menu? (a) it adds pictures (b) it tells its meaning (c) it makes text red (d) it loads faster
-
37.🔒 Is the connection to this address scrambled (encrypted)?
http://learn.example.com/maths/tables.html (a) Yes (b) No -
38.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>The red kite</p>
<p>Rain today</p> (a) The red kite (b) Rain today (c) My pets - 39.True or false: <img src="cat.png"> goes in index.html. (a) False (b) True
-
40.📱 The screen is 375px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (max-width: 1024px) {
p {
font-size: 10px;
}
} (a) Yes (b) No
Answer key
- Yes
- { }
- saves our .html files
- green
- in the head
- the line round the box
- script.js
- 4
- the text or picture
- 308
- news.html
- text with links
- click prize links
- padding
- blue
- .box
- index.html
- 11
- if
- puts boxes in the middle
- <a href="about.html">
- a class selector
- .note
- easy to read
- Yes
- an element selector
- lets you tick many
- 1
- True
- 1
- <body>
- 150
- False
- center
- hosts websites online
- it tells its meaning
- No
- My pets
- True
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids