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.🚀 Which file should this code go in: .box { padding: 8px; } (a) style.css (b) script.js (c) index.html
- 2.✍️ Which sign ends each CSS declaration? (a) . (b) ; (c) : (d) ,
- 3.📝 Which input type picks a day? (a) number (b) date (c) radio (d) submit
-
4.🔍 One closing tag is missing. Which one?
<h1>Fun facts</h1>
<u>Good morning!</u>
<em>Hello, world! (a) </em> (b) </h1> (c) </small> (d) </u> -
5.🖌️ What colour is behind the letters?
p {
background-color: yellow;
color: purple;
font-size: 28px;
text-align: right;
} (a) orange (b) yellow (c) purple -
6.🔍 Which line is missing its closing tag?
line 1: <strong>Our school trip</strong>
line 2: <p>The red kite</p>
line 3: <b>Good morning! (a) line 1 (b) line 3 (c) line 2 -
7.🔍 Which line is missing its closing tag?
line 1: <em>My best friend
line 2: <p>Fun facts</p>
line 3: <h2>Good morning!</h2> (a) line 2 (b) line 1 (c) line 3 -
8.🔗 Which words do you click on?
<a href="contact.html">Visit the site</a> (a) Maths fun (b) contact.html (c) Visit the site (d) href - 9.Which of these is true of <footer>? (a) sits at the bottom (b) is the page’s key part (c) holds a news story (d) holds a side box of tips
- 10.🚀 Which file should this code go in: score = score + 1; (a) style.css (b) script.js (c) index.html
-
11.🔍 One closing tag is missing. Which one?
<b>I love mangoes.
<i>Fun facts</i>
<small>My pets</small> (a) </small> (b) </i> (c) </h3> (d) </b> - 12.📝 What does <hr> draw? (a) a table (b) a picture (c) a link (d) a line across the page
-
13.📱 The screen is 700px wide. Does the rule inside @media apply?
p {
font-size: 20px;
}
@media (max-width: 1024px) {
p {
font-size: 18px;
}
} (a) Yes (b) No -
14.⚡ What number does this code print?
let a = 10;
let b = 9;
console.log(a * b); - 15.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) </h2> (c) <h2> (d) <h2/>
- 16.Which of these is not safe to do online? (a) post your home address (b) use a nickname in games (c) use a strong password (d) log out on shared PCs
-
17.🔁 How many times does this code print “Hello”?
for (let i = 1; i < 6; i++) {
console.log("Hello");
} - 18.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <html> (c) </head> (d) </body>
- 19.📦 In the box model, which part is the line round the box? (a) padding (b) content (c) border (d) margin
- 20.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
21.⚡ What number does this code print?
let a = 52;
let b = 10;
console.log(a - b); - 22.🔐 Is Mango#Kite29! a strong or a weak password? (a) weak (b) strong
- 23.📄 Can HTML on its own run a game loop? (a) No (b) Yes
- 24.Which of these is true of a web browser? (a) answers page requests (b) shows pages from the web (c) shows line numbers (d) sends pages over the net
- 25.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the later one (b) the first one (c) neither (d) the shorter one
- 26.True or false: <article> holds extra side notes. (a) True (b) False
-
27.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 4; i++) {
total = total + 2;
}
console.log(total); -
28.🔒 Is the connection to this address scrambled (encrypted)?
http://www.example.net/index.html (a) No (b) Yes - 29.🌐 Which one turns HTML into a page? (a) a web server (b) a web browser (c) a code editor
- 30.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
-
31.🔍 One closing tag is missing. Which one?
<h1>Rain today
<em>My pets</em>
<h3>Cricket is fun.</h3> (a) </h1> (b) </em> (c) </h3> (d) </u> - 32.Which of these is not safe to do online? (a) share your password (b) use a nickname in games (c) keep passwords secret (d) tell a trusted adult
-
33.⚖️ What colour is the text of this element?
<h2 class="box" id="main">Hi</h2>
CSS:
.box { color: yellow; }
.box { color: orange; } (a) orange (b) yellow (c) red (d) blue -
34.✍️ What is the selector in this CSS rule?
li {
color: red;
font-size: 20px;
} (a) body (b) li (c) 20px (d) color -
35.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>Fun facts</p>
<h4>I love mangoes.</h4> - 36.📝 Which input type takes only numbers? (a) text (b) submit (c) email (d) number
- 37.True or false: HTTPS sends the page back. (a) False (b) True
- 38.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
- 39.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) </html>
- 40.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
Answer key
- style.css
- ;
- date
- </em>
- yellow
- line 3
- line 1
- Visit the site
- sits at the bottom
- script.js
- </b>
- a line across the page
- Yes
- 90
- </h2>
- post your home address
- 5
- <!DOCTYPE html>
- border
- an opening tag
- 42
- strong
- No
- shows pages from the web
- the later one
- False
- 8
- No
- a web browser
- Yes
- </h1>
- share your password
- orange
- li
- 2
- number
- False
- <ul>
- </html>
- an empty tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids