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.True or false: h1 is an element selector. (a) True (b) False
-
2.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="checkbox" name="colour"> Blue
<input type="checkbox" name="colour"> Green
<input type="checkbox" name="colour"> Red
</form> -
3.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 90px;
padding: 15px;
border: 4px solid black;
margin: 10px;
} - 4.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a src="about.html">
- 5.Which of these does HTML do? (a) makes headings and lists (b) adds space around boxes (c) counts down a timer (d) lays out the page
- 6.⚡ Which tag holds JavaScript in a page? (a) <js> (b) <code> (c) <style> (d) <script>
- 7.🎯 How many elements on a page should have the same id? (a) any number (b) 2 (c) 5 (d) 1
-
8.🔒 Is the connection to this address scrambled (encrypted)?
https://www.example.net/news/today.html (a) No (b) Yes - 9.Which of these is an opening tag? (a) <p> (b) </li> (c) </p> (d) </b>
- 10.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the first one (c) the later one (d) the shorter one
- 11.🚀 Which file should this code go in: alert("Hi"); (a) style.css (b) script.js (c) index.html
- 12.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
- 13.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a hash # (d) a dollar $
-
14.📊 How many rows does this table have?
<table>
<tr><td>Litchi</td><td>Mango</td><td>Jamun</td><td>Banana</td></tr>
<tr><td>Jamun</td><td>Litchi</td><td>Papaya</td><td>Orange</td></tr>
<tr><td>Banana</td><td>Grapes</td><td>Litchi</td><td>Papaya</td></tr>
</table> -
15.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Hello, world!</p>
<h4>Hello, world!</h4>
<h3>Rain today</h3>
<h3>Our school trip</h3> - 16.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h3> or <h6>? (a) <h1> (b) <h6> (c) <h4> (d) <h3>
- 17.True or false: “skipping heading levels” helps everyone use the page. (a) True (b) False
- 18.📊 Which tag makes a heading cell? (a) <caption> (b) <td> (c) <th> (d) <table>
- 19.True or false: padding is the line round the box. (a) False (b) True
- 20.📝 Which input type is for one line of words? (a) submit (b) password (c) checkbox (d) text
- 21.♿ A part of the page is under a <h5> heading. Which tag should its sub-heading use? (a) <h2> (b) <h6> (c) <h5> (d) <h3>
- 22.🧩 Which language reacts to a button click? (a) JavaScript (b) HTML (c) CSS
-
23.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="150"> -
24.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Our school trip</p>
<p>The red kite</p> (a) Our school trip (b) My pets (c) The red kite - 25.⚖️ Which selector is the weakest? (a) a class selector (b) an id selector (c) an element selector
- 26.True or false: <b> is an empty tag. (a) False (b) True
-
27.✍️ How many declarations (property: value pairs) are in this rule?
h2 {
font-size: 20px;
font-weight: bold;
margin: 10px;
width: 300px;
} -
28.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 200px;
justify-content: flex-end;
}
Inside are 3 boxes, each 50px wide (no margins). -
29.🔁 What does this code print?
let score = 8;
if (score > 17) {
console.log("You win");
} else {
console.log("Play again");
} (a) You win (b) Play again - 30.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h4>? (a) <h2> (b) <h4> (c) <h5> (d) <h6>
- 31.⚡ Which JavaScript word runs code when true? (a) alert() (b) let (c) if (d) for
-
32.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Grapes</li>
</ul> - 33.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 34.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h2> or <h1>? (a) <h2> (b) <h5> (c) <h1> (d) <h3>
-
35.⚖️ What colour is the text of this element?
<p class="red" id="main">Hi</p>
CSS:
#main { color: black; }
p { color: purple; } (a) yellow (b) purple (c) black (d) green -
36.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 240px;
padding: 5px;
border: 1px solid black;
margin: 15px;
} -
37.🔁 What is the LAST number this code prints?
for (let i = 0; i < 15; i = i + 4) {
console.log(i);
} -
38.⚖️ What colour is the text of this element?
<h1 class="box" id="intro">Hi</h1>
CSS:
h1 { color: red; }
h1 { color: yellow; } (a) white (b) red (c) green (d) yellow -
39.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Our school trip</p> - 40.📱 Responsive design means a page ___. (a) is only for laptops (b) has no pictures (c) fits every screen (d) never changes
Answer key
- True
- 3
- 148
- <a href="about.html">
- makes headings and lists
- <script>
- 1
- Yes
- <p>
- the later one
- script.js
- blue
- a slash /
- 3
- 4
- <h1>
- False
- <th>
- False
- text
- <h6>
- JavaScript
- 150
- My pets
- an element selector
- False
- 4
- 50
- Play again
- <h6>
- if
- 2
- in the head
- <h1>
- black
- 252
- 12
- yellow
- 1
- fits every screen
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids