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 input type takes only numbers? (a) submit (b) number (c) date (d) password
- 2.True or false: <input type="checkbox"> sends the form. (a) True (b) False
- 3.Which of these goes in the head? (a) <table> (b) <p> (c) <title> (d) <a>
-
4.⚖️ What colour is the text of this element?
<p class="big" id="logo">Hi</p>
CSS:
p { color: yellow; }
p { color: orange; } (a) blue (b) yellow (c) orange (d) white - 5.True or false: CSS rounds box corners. (a) False (b) True
- 6.True or false: <td> makes one data cell. (a) True (b) False
- 7.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) src (d) href
-
8.🖌️ How big is the text, in px?
h1 {
background-color: white;
font-size: 36px;
text-align: right;
color: orange;
} - 9.True or false: #end is an element selector. (a) True (b) False
- 10.True or false: <li> lists things in any order. (a) True (b) False
-
11.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 8; i++) {
total = total + i;
}
console.log(total); - 12.🔁 When does the else part run? (a) when if is false (b) when if is true (c) always (d) never
- 13.🎯 What kind of selector is p? (a) an element selector (b) an id selector (c) a class selector
- 14.True or false: padding is the line round the box. (a) True (b) False
- 15.🎯 What kind of selector is h1? (a) a class selector (b) an id selector (c) an element selector
- 16.🔍 Which is the odd one out? (a) rounds box corners (b) checks a quiz answer (c) reacts to a button click (d) shows a pop-up message
- 17.🛡️ Online: is it safe to put secrets in comments? (a) not safe (b) safe
-
18.🔗 Which address opens when you click this link?
<a href="about.html">About us</a> (a) about.html (b) https://example.com (c) About us (d) contact.html - 19.🔁 Which word runs code only when something is true? (a) let (b) if (c) for (d) log
- 20.✍️ In color: blue; which part is the property? (a) color (b) blue (c) : (d) ;
-
21.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 130px;
padding: 30px;
border: 3px solid black;
margin: 10px;
} -
22.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<h2>Good morning!</h2>
<h2>Rain today</h2> - 23.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
-
24.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 240px;
padding: 10px;
border: 5px solid black;
margin: 0px;
} - 25.🔢 In a basic web page file, which comes first: “</html>” or “<html>”? (a) <html> (b) </html>
-
26.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (min-width: 1024px) {
p {
font-size: 26px;
}
} -
27.🔍 One closing tag is missing. Which one?
<i>Fun facts</i>
<em>I love mangoes.
<small>The red kite</small> (a) </p> (b) </small> (c) </em> (d) </i> - 28.📝 Which tag gives a form box a name you can click? (a) <hr> (b) <h1> (c) <title> (d) <label>
- 29.Which of these is an empty tag? (a) <br> (b) <h1> (c) <ul> (d) <p>
-
30.✍️ What is the selector in this CSS rule?
p {
font-weight: bold;
background-color: yellow;
padding: 8px;
text-align: center;
} (a) font-weight (b) .note (c) p (d) yellow -
31.✍️ Which property is set to 10px in this rule?
.box {
text-align: center;
color: red;
margin: 10px;
padding: 8px;
} (a) font-weight (b) 10px (c) padding (d) margin - 32.📄 Can HTML on its own count button clicks? (a) Yes (b) No
- 33.Which of these is a closing tag? (a) <p> (b) </p> (c) <title> (d) <li>
- 34.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h4> or <h5>? (a) <h4> (b) <h6> (c) <h5> (d) <h1>
- 35.📦 In the box model, which part is a solid or dotted edge? (a) content (b) border (c) margin (d) padding
- 36.🎯 What kind of selector is #end? (a) an element selector (b) a class selector (c) an id selector
- 37.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ul> (d) <ol>
- 38.🌍 Which one is the page’s address? (a) HTTPS (b) the browser (c) the URL (d) the server
- 39.📝 What do we need to write HTML? (a) a plain text editor (b) a microphone (c) a printer (d) a paintbrush
-
40.⚖️ What colour is the text of this element?
<h1 class="star" id="intro">Hi</h1>
CSS:
.star { color: purple; }
.star { color: blue; } (a) white (b) blue (c) red (d) purple
Answer key
- number
- False
- <title>
- orange
- True
- True
- href
- 36
- False
- False
- 36
- when if is false
- an element selector
- False
- an element selector
- rounds box corners
- not safe
- about.html
- if
- color
- 216
- 1
- a slash /
- 270
- <html>
- 26
- </em>
- <label>
- <br>
- p
- margin
- No
- </p>
- <h1>
- border
- an id selector
- <li>
- the URL
- a plain text editor
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids