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 colour is the text of this element?
<h1 class="star" id="main">Hi</h1>
CSS:
#main { color: black; }
#main { color: yellow; } (a) orange (b) black (c) yellow (d) purple -
2.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Easy snacks (b) Riya’s Recipes (c) Thanks for visiting. (d) index.html - 3.🚀 Which file is best for code that reacts to clicks? (a) style.css (b) script.js (c) notes.txt (d) index.html
- 4.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h1> or <h3>? (a) <h2> (b) <h1> (c) <h6> (d) <h3>
-
5.🎯 Which CSS selector matches this element?
<span class="note" id="main">Hello</span> (a) #logo (b) .note (c) p (d) .main - 6.🧭 Why use <nav> instead of <div> for a menu? (a) it tells its meaning (b) it loads faster (c) it makes text red (d) it adds pictures
- 7.🌈 Which colour of light is strongest in rgb(81, 46, 217)? (a) red (b) green (c) blue
- 8.🌍 Which one scrambles data on its way? (a) the URL (b) HTTPS (c) the browser (d) the server
-
9.⚡ What does this code show?
let name = "Meera";
console.log("Well done, " + name + "!"); (a) name (b) Well done, Meera! (c) Meera (d) Well done, name! - 10.📝 Which input type is for one line of words? (a) email (b) text (c) number (d) submit
-
11.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 560px;
justify-content: center;
}
Inside are 4 boxes, each 100px wide (no margins). - 12.💬 How does an HTML comment end? (a) */ (b) // (c) --> (d) >>
- 13.True or false: HTML on its own can make links to pages. (a) True (b) False
- 14.🎯 Which sign starts an id selector? (a) & (b) . (c) @ (d) #
-
15.🔍 Which line is missing its closing tag?
line 1: <i>Our school trip
line 2: <h3>Rain today</h3>
line 3: <small>The red kite</small> (a) line 3 (b) line 1 (c) line 2 - 16.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an attribute (d) an element name
- 17.⚖️ Which selector is the strongest? (a) a class selector (b) an id selector (c) an element selector
- 18.🌗 Is pink on red easy or hard to read? (a) easy to read (b) hard to read
- 19.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
-
20.📊 How many rows does this table have?
<table>
<tr><td>Litchi</td><td>Grapes</td></tr>
<tr><td>Papaya</td><td>Banana</td></tr>
<tr><td>Litchi</td><td>Jamun</td></tr>
</table> -
21.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 320px;
justify-content: flex-end;
}
Inside are 4 boxes, each 60px wide (no margins). - 22.📱 What does a media query check? (a) the battery level (b) the page title (c) the screen width (d) the time of day
- 23.🔍 Which is the odd one out? (a) puts a picture on a page (b) rounds box corners (c) lays out the page (d) changes the text size
- 24.♿ Which link text is clearest? (a) link (b) click here (c) Read the fruit facts (d) here
-
25.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Guava</li>
</ol> -
26.🔗 Which address opens when you click this link?
<a href="quiz.html">School news</a> (a) games.html (b) about.html (c) quiz.html (d) School news - 27.🔢 To build and share your first web page, what comes right after “plan what to show”? (a) write the HTML (b) test in a browser (c) publish it online (d) add CSS styles
- 28.⚡ Which JavaScript word runs code when true? (a) let (b) if (c) for (d) console.log()
- 29.🎯 Which element does the selector #main style? (a) <div class="main"> (b) <span class="box"> (c) <div id="logo"> (d) <div id="main">
- 30.🔁 Which loop repeats code a set number of times? (a) for (b) if (c) let (d) else
- 31.📊 Which tag holds the whole table? (a) <table> (b) <caption> (c) <td> (d) <th>
- 32.🔍 Which is the odd one out? (a) hosts websites online (b) saves our .html files (c) stores a website’s files (d) sends pages over the net
-
33.🔁 How many numbers does this code print?
for (let i = 0; i < 20; i = i + 3) {
console.log(i);
} - 34.🛡️ Online: is it safe to share your OTP? (a) not safe (b) safe
- 35.🎯 Which element does the selector .box style? (a) <li id="box"> (b) <li class="box"> (c) <div class="menu"> (d) <li class="star">
- 36.📝 Which tag holds a whole form? (a) <table> (b) <input> (c) <form> (d) <ol>
-
37.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>My best friend</p>
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> --> (a) Cricket is fun. (b) Fun facts (c) My best friend (d) I love mangoes. - 38.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) type the password (b) click it twice (c) close it, tell an adult (d) share it with friends
- 39.True or false: <header> holds extra side notes. (a) False (b) True
- 40.Which of these is an opening tag? (a) </h1> (b) </li> (c) </b> (d) <title>
Answer key
- yellow
- Riya’s Recipes
- script.js
- <h6>
- .note
- it tells its meaning
- blue
- HTTPS
- Well done, Meera!
- text
- 80
- -->
- True
- #
- line 1
- an attribute
- an id selector
- hard to read
- <ol>
- 3
- 80
- the screen width
- puts a picture on a page
- Read the fruit facts
- 2
- quiz.html
- write the HTML
- if
- <div id="main">
- for
- <table>
- saves our .html files
- 7
- not safe
- <li class="box">
- <form>
- I love mangoes.
- close it, tell an adult
- False
- <title>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids