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 element does the selector span style? (a) <h1 class="note"> (b) <h2 id="logo"> (c) <span class="note"> (d) <p>
- 2.♿ Does this help everyone, or make the page harder to use: colour as the only clue? (a) helps everyone (b) makes it harder
- 3.🔢 On a typical page, from top to bottom, which comes FIRST? (a) <nav> (b) <footer> (c) <main> (d) <header>
- 4.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <ol> (d) <br>
- 5.🧭 Is <div> semantic or not semantic? (a) not semantic (b) semantic
- 6.True or false: <input type="number"> takes only numbers. (a) False (b) True
- 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z
- 8.🌈 Which colour is #ffffff? (a) cyan (b) black (c) white (d) blue
- 9.📝 Which tag makes a drop-down list? (a) <li> (b) <ol> (c) <ul> (d) <select>
-
10.✍️ How many declarations (property: value pairs) are in this rule?
h1 {
width: 300px;
font-size: 20px;
color: red;
} - 11.What does color do? (a) centres a heading (b) colours behind the text (c) makes letters bigger (d) sets the letter colour
-
12.✍️ What is the selector in this CSS rule?
.note {
background-color: yellow;
text-align: center;
} (a) #top (b) .note (c) center (d) background-color -
13.📱 The screen is 414px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (min-width: 480px) {
p {
font-size: 14px;
}
} (a) Yes (b) No - 14.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
-
15.🔍 Which line is missing its closing tag?
line 1: <h2>Good morning!
line 2: <i>Hello, world!</i>
line 3: <u>My best friend</u> (a) line 3 (b) line 2 (c) line 1 -
16.📊 How many cells does this table have in all?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
<tr><td>Jamun</td><td>Orange</td><td>Grapes</td><td>Orange</td></tr>
</table> - 17.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h6> (d) <h1>
- 18.🌍 Which one scrambles data on its way? (a) the server (b) the URL (c) the browser (d) HTTPS
-
19.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 40px;
padding: 30px;
border: 2px solid black;
margin: 5px;
} -
20.🎯 Which CSS selector matches this element?
<li class="red" id="main">Hello</li> (a) .main (b) .box (c) .red (d) div - 21.Which of these is true of <aside>? (a) holds extra side notes (b) is the page’s key part (c) holds one blog post (d) holds the main content
- 22.💪 Which justify-content value packs boxes at the end? (a) center (b) flex-start (c) flex-end (d) space-between
- 23.🔢 In a basic web page file, which comes LAST? (a) <html> (b) </html> (c) </body> (d) <!DOCTYPE html>
- 24.True or false: <input type="text"> lets you tick many. (a) False (b) True
- 25.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <p> (c) <meta charset="utf-8"> (d) <style>
- 26.🔢 When you open a web page, which comes first: “you type the URL” or “the browser asks it”? (a) you type the URL (b) the browser asks it
-
27.🎯 Which CSS selector matches this element?
<h2 class="box" id="top">Hello</h2> (a) #intro (b) #box (c) #top (d) li -
28.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Roses are red<br>Sky is blue<br>Rivers flow<br>Stars shine</p> - 29.🔢 When you open a web page, which comes FIRST? (a) the browser shows it (b) DNS finds the server (c) you type the URL (d) the server sends files
- 30.True or false: the border is the line round the box. (a) False (b) True
- 31.📄 Can HTML on its own make headings? (a) No (b) Yes
-
32.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 220px;
justify-content: center;
}
Inside are 2 boxes, each 40px wide (no margins). - 33.🎯 Can many elements share the same class? (a) No (b) Yes
- 34.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) black (c) cyan (d) magenta
- 35.True or false: to put secrets in comments is safe. (a) True (b) False
-
36.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 240px;
justify-content: flex-end;
}
Inside are 4 boxes, each 40px wide (no margins). -
37.⚡ What does this code print? (Look at the quotes!)
let x = "8";
let y = 5;
console.log(x + y); (a) 85 (b) 13 (c) Error -
38.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) Space Facts (b) I like to read. (c) body (d) Welcome! -
39.✍️ What value is given to background-color in this rule?
.box {
font-style: italic;
background-color: yellow;
} (a) 8px (b) yellow (c) 10px (d) background-color - 40.🔠 Are headings shown in bold by default? (a) No (b) Yes
Answer key
- <span class="note">
- makes it harder
- <header>
- <ul>
- not semantic
- True
- F
- white
- <select>
- 3
- sets the letter colour
- .note
- No
- a web server
- line 1
- 8
- <h6>
- HTTPS
- 114
- .red
- holds extra side notes
- flex-end
- </html>
- False
- <p>
- you type the URL
- #top
- 5
- you type the URL
- True
- Yes
- 70
- Yes
- red
- False
- 80
- 85
- Welcome!
- yellow
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids