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 selector in this CSS rule?
#top {
color: red;
width: 300px;
text-align: center;
background-color: yellow;
} (a) li (b) #top (c) 300px (d) color - 2.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 3.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as one space (d) as a dot
-
4.⚡ What does this code show?
let name = "Kabir";
console.log("Welcome, " + name + "!"); (a) name (b) Kabir (c) Welcome, Kabir! (d) Welcome, name! - 5.True or false: <meta> has a closing tag. (a) True (b) False
- 6.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) Home Text (c) Hot Tags (d) HyperText
-
7.⚖️ What colour is the text of this element?
<h1 class="box" id="hero">Hi</h1>
CSS:
.box { color: orange; }
.box { color: red; } (a) green (b) blue (c) orange (d) red - 8.🛡️ Online: is it safe to check for https first? (a) safe (b) not safe
- 9.♿ What does good colour contrast mean? (a) no colours at all (b) only red text (c) text stands out clearly (d) many bright colours
- 10.🌈 Which colour of light is strongest in rgb(73, 11, 220)? (a) blue (b) green (c) red
-
11.📊 How many cells does this table have in all?
<table>
<tr><td>Guava</td><td>Mango</td><td>Banana</td></tr>
<tr><td>Orange</td><td>Jamun</td><td>Orange</td></tr>
<tr><td>Mango</td><td>Banana</td><td>Papaya</td></tr>
<tr><td>Jamun</td><td>Banana</td><td>Mango</td></tr>
</table> - 12.📊 Where do <td> cells go? (a) inside a <tr> (b) inside a <li> (c) inside the <head> (d) inside a <p>
- 13.🎯 Which element does the selector h2 style? (a) <div class="box"> (b) <span id="end"> (c) <h2 class="box"> (d) <li>
- 14.⚡ Which JavaScript word writes in the console? (a) let (b) for (c) console.log() (d) if
- 15.🚀 Should file names have spaces, like my page.html? (a) No (b) Yes
- 16.⚖️ Which selector is the strongest? (a) a class selector (b) an id selector (c) an element selector
- 17.Which of these is true of <header>? (a) is the page’s key part (b) holds copyright notes (c) sits at the very top (d) holds extra side notes
- 18.True or false: padding is space inside the border. (a) True (b) False
- 19.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
-
20.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>Our school trip</h2>
<p>Fun facts</p> -
21.📊 How many heading cells (<th>) does this table have?
<table>
<tr><th>Name</th><th>Fruit</th></tr>
<tr><td>Orange</td><td>Banana</td></tr>
<tr><td>Grapes</td><td>Mango</td></tr>
</table> - 22.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h3> or <h5>? (a) <h5> (b) <h2> (c) <h6> (d) <h3>
-
23.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="300"> (a) kite.png (b) tiger.jpg (c) fort.jpg (d) An old fort -
24.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Mango</li>
<li>Guava</li>
</ol> -
25.📊 How many cells are in each row?
<table>
<tr><td>Papaya</td><td>Grapes</td><td>Orange</td></tr>
<tr><td>Mango</td><td>Litchi</td><td>Banana</td></tr>
<tr><td>Grapes</td><td>Papaya</td><td>Guava</td></tr>
</table> - 26.🧩 Which language reacts to a button click? (a) CSS (b) JavaScript (c) HTML
-
27.🔁 How many times does this code print “Hello”?
for (let i = 0; i <= 6; i++) {
console.log("Hello");
} -
28.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Our school trip</p>
<p>My pets</p>
<p>Good morning!</p> (a) Our school trip (b) My pets (c) Good morning! (d) My best friend - 29.⚖️ Which selector is the weakest? (a) a class selector (b) an element selector (c) an id selector
- 30.🌈 Which colour is #00ff00? (a) cyan (b) magenta (c) white (d) bright green
- 31.🎯 Which element does the selector p style? (a) <h1> (b) <p class="menu"> (c) <h2 class="menu"> (d) <li id="logo">
- 32.💪 Which justify-content value equal gaps, none at ends? (a) space-between (b) flex-start (c) center (d) flex-end
- 33.📝 Which input type lets you pick only one? (a) number (b) text (c) password (d) radio
-
34.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h2>Cricket is fun.</h2>
<p>Fun facts</p>
<h4>Rain today</h4> - 35.⚡ Which JavaScript word shows a pop-up box? (a) for (b) alert() (c) if (d) let
- 36.📦 In the box model, which part is the text or picture? (a) margin (b) content (c) border (d) padding
- 37.True or false: <caption> makes one table row. (a) False (b) True
- 38.📝 Which input type lets you tick many? (a) date (b) checkbox (c) password (d) number
- 39.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <html> (d) <!DOCTYPE html>
- 40.💪 Which flexbox property turns on flexbox? (a) flex-direction (b) gap (c) justify-content (d) display: flex
Answer key
- #top
- has a closing tag
- as one space
- Welcome, Kabir!
- False
- HyperText
- red
- safe
- text stands out clearly
- blue
- 12
- inside a <tr>
- <h2 class="box">
- console.log()
- No
- an id selector
- sits at the very top
- True
- No
- 2
- 2
- <h2>
- fort.jpg
- 3
- 3
- JavaScript
- 7
- My best friend
- an element selector
- bright green
- <p class="menu">
- space-between
- radio
- 3
- alert()
- content
- False
- checkbox
- <!DOCTYPE html>
- display: flex
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids