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 one colours code to help us? (a) a web browser (b) a code editor (c) a web server
- 2.🚀 Which file is best for code that reacts to clicks? (a) script.js (b) style.css (c) index.html (d) notes.txt
-
3.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>Rain today</p> -->
<p>I love mangoes.</p> -
4.🔗 Which words do you click on?
<a href="news.html">Visit the site</a> (a) Maths fun (b) news.html (c) href (d) Visit the site - 5.🔁 Which loop repeats code a set number of times? (a) for (b) else (c) if (d) let
- 6.True or false: a web browser opens web pages for us. (a) True (b) False
- 7.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <p> (d) <ol>
-
8.📊 How many cells are in each row?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
<tr><td>Papaya</td><td>Jamun</td><td>Jamun</td><td>Mango</td></tr>
</table> -
9.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>My best friend</p>
<!-- <p>My pets</p> --> (a) My best friend (b) My pets (c) Good morning! - 10.🏷️ Which is the closing tag for <small>? (a) <small/> (b) </small> (c) <\small> (d) <small>
- 11.True or false: <style> goes in the body. (a) True (b) False
-
12.🌍 What is the protocol in this URL?
https://school.example.in/index.html (a) /index.html (b) http (c) https (d) school.example.in - 13.🚀 You change your code. What should you do to see the change? (a) switch off the PC (b) rename the folder (c) save and refresh (d) delete the file
- 14.True or false: the browser shows the page to you. (a) False (b) True
- 15.🔁 When does the else part run? (a) when if is false (b) never (c) when if is true (d) always
- 16.⚡ Which JavaScript word runs code when true? (a) alert() (b) console.log() (c) if (d) for
-
17.🖌️ What colour are the letters?
p {
text-align: center;
font-size: 24px;
color: orange;
background-color: yellow;
} (a) orange (b) yellow (c) purple - 18.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
19.🔗 Which words do you click on?
<a href="art.html">Visit the site</a> (a) href (b) art.html (c) Maths fun (d) Visit the site - 20.Which of these does CSS do? (a) checks a quiz answer (b) rounds box corners (c) makes headings and lists (d) makes a form box
- 21.🎨 Which attribute adds CSS inside one tag? (a) style (b) alt (c) href (d) src
- 22.True or false: HTML on its own cannot make links to pages. (a) False (b) True
- 23.True or false: <input type="number"> takes only numbers. (a) False (b) True
- 24.🌈 Which hex code is yellow? (a) #ff0000 (b) #00ffff (c) #ffff00 (d) #000000
-
25.⚡ What number does this code print?
let coins = 13;
coins = coins + 16;
coins = coins - 23;
console.log(coins); - 26.📱 min-width: 800px applies when the screen is ___. (a) 800px or narrower (b) turned off (c) exactly 100px (d) 800px or wider
- 27.True or false: <caption> gives the table a title. (a) False (b) True
- 28.🚀 What is the home page file of a website usually called? (a) index.html (b) home.css (c) main.png (d) start.js
- 29.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) red (d) blue
- 30.True or false: <input type="password"> lets you tick many. (a) True (b) False
-
31.📱 The screen is 320px wide. Does the rule inside @media apply?
p {
font-size: 24px;
}
@media (min-width: 480px) {
p {
font-size: 26px;
}
} (a) No (b) Yes -
32.✍️ What is the selector in this CSS rule?
h2 {
text-align: center;
border: 2px solid;
padding: 8px;
color: red;
} (a) text-align (b) h1 (c) h2 (d) 2px solid -
33.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 160px;
padding: 5px;
border: 2px solid black;
margin: 20px;
} - 34.⚖️ Which selector is the strongest? (a) an element selector (b) a class selector (c) an id selector
-
35.⚖️ What colour is the text of this element?
<h2 class="box" id="intro">Hi</h2>
CSS:
h2 { color: orange; }
h2 { color: black; } (a) orange (b) black (c) white (d) blue -
36.📋 What number does the browser show next to “Guava”?
<ol>
<li>Grapes</li>
<li>Litchi</li>
<li>Guava</li>
<li>Papaya</li>
<li>Jamun</li>
</ol> - 37.⚡ Which JavaScript word repeats code? (a) console.log() (b) for (c) alert() (d) if
- 38.⚡ Which word makes a new variable? (a) give (b) let (c) make (d) put
-
39.🖌️ How big is the text, in px?
h1 {
background-color: white;
text-align: left;
font-size: 24px;
color: black;
} - 40.📊 Are <th> cells shown bold and centred by default? (a) No (b) Yes
Answer key
- a code editor
- script.js
- 2
- Visit the site
- for
- True
- <li>
- 4
- My pets
- </small>
- False
- https
- save and refresh
- True
- when if is false
- if
- orange
- Yes
- Visit the site
- rounds box corners
- style
- False
- True
- #ffff00
- 6
- 800px or wider
- True
- index.html
- red
- False
- No
- h2
- 174
- an id selector
- black
- 3
- for
- let
- 24
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids