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.🔁 How many times does this code print “Hi”?
for (let i = 0; i <= 9; i++) {
console.log("Hi");
} - 2.🌈 Which colour of light is strongest in rgb(194, 101, 92)? (a) blue (b) red (c) green
-
3.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Rain today</p>
<!-- <p>I love mangoes.</p> --> (a) I love mangoes. (b) Rain today (c) My pets -
4.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 260px;
padding: 15px;
border: 1px solid black;
margin: 15px;
} - 5.True or false: alert("Hi"); goes in index.html. (a) True (b) False
-
6.⚖️ What colour is the text of this element?
<p class="red" id="hero">Hi</p>
CSS:
.red { color: green; }
#hero { color: black; }
p { color: white; } (a) white (b) purple (c) black (d) green - 7.True or false: the server scrambles data on its way. (a) True (b) False
- 8.🔍 Which is the odd one out? (a) saves our .html files (b) colours code to help us (c) shows line numbers (d) stores a website’s files
- 9.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h6> or <h2>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
- 10.🌍 Which one shows the page to you? (a) the server (b) the URL (c) HTTPS (d) the browser
- 11.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) type the password (b) close it, tell an adult (c) click it twice (d) share it with friends
- 12.📝 What does a password box show instead of letters? (a) emojis (b) dots (c) capital letters (d) numbers
-
13.📱 The screen is 700px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (min-width: 600px) {
p {
font-size: 14px;
}
} (a) Yes (b) No - 14.True or false: <td> holds the whole table. (a) False (b) True
- 15.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
-
16.🔗 Which words do you click on?
<a href="quiz.html">Art corner</a> (a) href (b) School news (c) Art corner (d) quiz.html -
17.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Jamun</li>
</ul> (a) numbers (b) bullets - 18.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
- 19.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
20.✍️ What is the selector in this CSS rule?
p {
margin: 10px;
font-size: 20px;
font-weight: bold;
} (a) .note (b) 20px (c) p (d) margin -
21.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="checkbox" name="fruit"> Banana
<input type="checkbox" name="fruit"> Litchi
<input type="checkbox" name="fruit"> Papaya
<input type="checkbox" name="fruit"> Guava
<input type="checkbox" name="fruit"> Mango
</form> -
22.🔗 Which words do you click on?
<a href="quiz.html">Play games</a> (a) About us (b) quiz.html (c) href (d) Play games - 23.True or false: a web browser is where we type code. (a) False (b) True
-
24.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>Good morning!</h2>
<p>Fun facts</p>
<p>Rain today</p>
<h2>My pets</h2> - 25.🧭 Who is helped most by semantic tags? (a) only the printer (b) only the server (c) screen-reader users (d) nobody
- 26.True or false: margin is space inside the border. (a) True (b) False
- 27.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
- 28.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
- 29.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <li> (d) <p>
- 30.🌈 In #007d00 the green part is the hex number 7d. What is it as a normal number?
- 31.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a href="about.html"> (d) <a alt="about.html">
-
32.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Kites fly high<br>Birds sing<br>Sky is blue<br>Roses are red</p> -
33.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>My pets</p>
<!-- <p>I love mangoes.</p> -->
<p>Cricket is fun.</p> (a) I love mangoes. (b) Cricket is fun. (c) My pets (d) Rain today -
34.✍️ What value is given to background-color in this rule?
p {
width: 300px;
background-color: yellow;
} (a) 10px (b) background-color (c) 8px (d) yellow -
35.🎯 Which CSS selector matches this element?
<h1 class="big" id="main">Hello</h1> (a) .main (b) .red (c) .big (d) #big - 36.Which of these has a closing tag? (a) <br> (b) <hr> (c) <ul> (d) <input>
- 37.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) id (d) src
- 38.🔐 Is Blue@Tiger_74 a strong or a weak password? (a) strong (b) weak
-
39.🔗 Which words do you click on?
<a href="games.html">About us</a> (a) games.html (b) href (c) Contact us (d) About us - 40.🚀 Which file should this code go in: alert(score); (a) style.css (b) script.js (c) index.html
Answer key
- 10
- red
- I love mangoes.
- 322
- False
- black
- False
- stores a website’s files
- <h1>
- the browser
- close it, tell an adult
- dots
- Yes
- False
- False
- Art corner
- bullets
- 6
- Yes
- p
- 5
- Play games
- False
- 3
- screen-reader users
- False
- in the body
- a web browser
- <li>
- 125
- <a href="about.html">
- 5
- I love mangoes.
- yellow
- .big
- <ul>
- href
- strong
- About us
- script.js
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids