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 is the LAST number this code prints?
for (let i = 0; i < 16; i = i + 3) {
console.log(i);
} -
2.📊 How many cells are in each row?
<table>
<tr><td>Jamun</td><td>Papaya</td><td>Litchi</td></tr>
<tr><td>Jamun</td><td>Guava</td><td>Jamun</td></tr>
<tr><td>Guava</td><td>Grapes</td><td>Mango</td></tr>
</table> -
3.🔍 One closing tag is missing. Which one?
<p>The red kite</p>
<small>Cricket is fun.</small>
<h1>My best friend (a) </small> (b) </em> (c) </h1> (d) </p> -
4.📋 Does this list show bullets or numbers?
<ol>
<li>Litchi</li>
<li>Mango</li>
</ol> (a) bullets (b) numbers -
5.🔁 How many times does this code print “Welcome”?
for (let i = 0; i <= 5; i++) {
console.log("Welcome");
} -
6.📊 How many cells are in each row?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
<tr><td>Litchi</td><td>Papaya</td><td>Orange</td></tr>
<tr><td>Orange</td><td>Mango</td><td>Guava</td></tr>
</table> -
7.🔗 Where does this link open?
<a href="games.html">School news</a> (a) in a new tab (b) in the same tab - 8.♿ Does this help everyone, or make the page harder to use: add alt text to images? (a) helps everyone (b) makes it harder
-
9.🔠 How many headings are in this code?
<h1>My pets</h1>
<h3>Hello, world!</h3>
<p>Rain today</p>
<p>Fun facts</p> - 10.True or false: #hero is a class selector. (a) False (b) True
- 11.True or false: <td> makes one table row. (a) False (b) True
-
12.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (max-width: 600px) {
p {
font-size: 14px;
}
} - 13.🧭 Which semantic tag holds a side box of tips? (a) <footer> (b) <article> (c) <aside> (d) <header>
- 14.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
- 15.Which of these is true of a web browser? (a) saves our .html files (b) has an address bar (c) sends pages over the net (d) colours code to help us
- 16.🚀 Which file should this code go in: <img src="cat.png"> (a) script.js (b) style.css (c) index.html
- 17.Which of these is an empty tag? (a) <b> (b) <ul> (c) <br> (d) <p>
- 18.Which of these is true of <main>? (a) holds the logo and title (b) sits at the bottom (c) helps you move around (d) holds the main content
- 19.🚀 Which tag loads script.js into a page? (a) <a href="script.js"> (b) <script src="script.js"> (c) <js src="script.js"> (d) <link script.js>
- 20.🎨 A CSS file usually ends with which extension? (a) .js (b) .html (c) .css (d) .png
- 21.True or false: #top { color: blue; } goes in style.css. (a) False (b) True
- 22.Which of these does JavaScript do? (a) shows a pop-up message (b) makes a link (c) sets colours and fonts (d) makes headings and lists
- 23.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <ul> (d) <br>
- 24.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) id (d) src
- 25.💪 Which flexbox property picks row or column? (a) display: flex (b) align-items (c) flex-direction (d) justify-content
- 26.⚡ A JavaScript file usually ends with which extension? (a) .js (b) .css (c) .jpg (d) .html
- 27.🔢 On a typical page, from top to bottom, what comes right after “<nav>”? (a) <main> (b) <header> (c) <footer>
-
28.✍️ What value is given to color in this rule?
h1 {
font-style: italic;
color: red;
} (a) 20px (b) color (c) red (d) center -
29.✍️ How many declarations (property: value pairs) are in this rule?
body {
text-align: center;
} - 30.🔢 To build and share your first web page, which comes first: “write the HTML” or “publish it online”? (a) publish it online (b) write the HTML
- 31.True or false: <style> goes in the body. (a) True (b) False
- 32.Which of these does JavaScript do? (a) makes headings and lists (b) counts down a timer (c) sets colours and fonts (d) adds space around boxes
- 33.Which of these is safe to do online? (a) post your home address (b) ask before downloading (c) share your OTP (d) download from pop-ups
- 34.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
- 35.🌗 Is yellow on white easy or hard to read? (a) easy to read (b) hard to read
-
36.✍️ How many declarations (property: value pairs) are in this rule?
li {
font-size: 20px;
color: red;
width: 300px;
} -
37.✍️ Which property is set to red in this rule?
.note {
font-size: 20px;
background-color: yellow;
color: red;
} (a) text-align (b) color (c) red (d) font-size -
38.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (max-width: 1024px) {
p {
font-size: 6px;
}
} -
39.🔍 One closing tag is missing. Which one?
<h1>Cricket is fun.
<u>I love mangoes.</u>
<p>My pets</p> (a) </u> (b) </h1> (c) </h2> (d) </p> -
40.🖌️ What colour is behind the letters?
p {
font-size: 32px;
background-color: black;
color: yellow;
text-align: right;
} (a) yellow (b) red (c) black
Answer key
- 15
- 3
- </h1>
- numbers
- 6
- 3
- in the same tab
- helps everyone
- 2
- False
- False
- 14
- <aside>
- Yes
- has an address bar
- index.html
- <br>
- holds the main content
- <script src="script.js">
- .css
- True
- shows a pop-up message
- <ol>
- href
- flex-direction
- .js
- <main>
- red
- 1
- write the HTML
- False
- counts down a timer
- ask before downloading
- red
- hard to read
- 3
- color
- 6
- </h1>
- black
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids