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.🔁 What does this code print?
let age = 3;
if (age < 7) {
console.log("teen");
} else {
console.log("child");
} (a) teen (b) child -
2.📱 The screen is 414px wide. Does the rule inside @media apply?
p {
font-size: 20px;
}
@media (max-width: 1024px) {
p {
font-size: 18px;
}
} (a) Yes (b) No - 3.🖌️ Which CSS property colours behind the text? (a) font-family (b) text-align (c) font-size (d) background-color
- 4.📦 In the box model, which part is space inside the border? (a) padding (b) border (c) content (d) margin
- 5.📱 Responsive design means a page ___. (a) is only for laptops (b) has no pictures (c) never changes (d) fits every screen
- 6.What is <input type="radio"> for? (a) is for an email address (b) lets you pick only one (c) is for one line of words (d) hides what you type
-
7.⚡ What number does this code print?
let a = 33;
let b = 9;
console.log(a + b); - 8.💬 How does an HTML comment start? (a) # (b) // (c) <!-- (d) /*
- 9.🌈 Which colour is #ffffff? (a) bright green (b) red (c) magenta (d) white
- 10.True or false: <th> gives the table a title. (a) False (b) True
- 11.🛡️ Online: is it safe to type a password on http? (a) safe (b) not safe
-
12.🎯 Which CSS selector matches this element?
<h1 class="red" id="hero">Hello</h1> (a) #red (b) .hero (c) #hero (d) #top -
13.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p>
<p>My best friend</p>
<p>Rain today</p> (a) My best friend (b) Rain today (c) Cricket is fun. (d) Our school trip - 14.🧩 Which language lays out the page? (a) JavaScript (b) CSS (c) HTML
- 15.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 16.⚡ Which JavaScript word shows a pop-up box? (a) if (b) for (c) alert() (d) console.log()
- 17.Which of these is a closing tag? (a) </li> (b) <title> (c) <h1> (d) <b>
- 18.What does justify-content: center do? (a) puts boxes in the middle (b) equal gaps, none at ends (c) packs boxes at the start (d) packs boxes at the end
- 19.⚡ Where does console.log() show its output? (a) in the console (b) in the address bar (c) on the printer (d) on the title bar
- 20.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
-
21.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>I love mangoes.</p> -->
<p>My best friend</p> (a) My best friend (b) Our school trip (c) I love mangoes. -
22.⚡ What number does this code print?
let coins = 13;
coins = coins + 20;
coins = coins - 8;
console.log(coins); - 23.🧩 Which language shows a pop-up message? (a) JavaScript (b) HTML (c) CSS
- 24.✍️ CSS declarations go inside which brackets? (a) ( ) (b) [ ] (c) { } (d) < >
- 25.🚀 What is the home page file of a website usually called? (a) main.png (b) home.css (c) start.js (d) index.html
- 26.🔍 Which is the odd one out? (a) shows a pop-up message (b) checks a quiz answer (c) puts a picture on a page (d) changes the page live
-
27.📱 The screen is 700px wide. Does the rule inside @media apply?
p {
font-size: 16px;
}
@media (min-width: 600px) {
p {
font-size: 18px;
}
} (a) No (b) Yes - 28.🌈 In #d20000 the red part is the hex number d2. What is it as a normal number?
- 29.What does justify-content: flex-end do? (a) puts boxes in the middle (b) packs boxes at the end (c) equal gaps, none at ends (d) packs boxes at the start
- 30.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h1> or <h3>? (a) <h1> (b) <h4> (c) <h3> (d) <h2>
- 31.Which of these does JavaScript do? (a) checks a quiz answer (b) adds space around boxes (c) changes the text size (d) gives the page structure
-
32.📱 The screen is 414px wide. Does the rule inside @media apply?
p {
font-size: 20px;
}
@media (max-width: 768px) {
p {
font-size: 14px;
}
} (a) No (b) Yes - 33.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
- 34.✍️ Which sign goes between a property and its value? (a) - (b) = (c) : (d) ;
- 35.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h1> or <h5>? (a) <h5> (b) <h6> (c) <h4> (d) <h1>
- 36.🔍 Which is the odd one out? (a) saves our .html files (b) stores a website’s files (c) shows line numbers (d) is where we type code
- 37.🌐 Which one turns HTML into a page? (a) a web server (b) a code editor (c) a web browser
-
38.🔗 Which words do you click on?
<a href="https://example.com">Contact us</a> (a) Contact us (b) href (c) Visit the site (d) https://example.com - 39.🔐 Is 123456 a strong or a weak password? (a) strong (b) weak
-
40.⚖️ What colour is the text of this element?
<h2 class="star" id="logo">Hi</h2>
CSS:
.star { color: red; }
h2 { color: yellow; } (a) black (b) blue (c) yellow (d) red
Answer key
- teen
- Yes
- background-color
- padding
- fits every screen
- lets you pick only one
- 42
- <!--
- white
- False
- not safe
- #hero
- Our school trip
- CSS
- an opening tag
- alert()
- </li>
- puts boxes in the middle
- in the console
- src
- I love mangoes.
- 25
- JavaScript
- { }
- index.html
- puts a picture on a page
- Yes
- 210
- packs boxes at the end
- <h1>
- checks a quiz answer
- Yes
- a web browser
- :
- <h1>
- stores a website’s files
- a web browser
- Contact us
- weak
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids