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 element does the selector .big style? (a) <h2 class="red"> (b) <li class="box"> (c) <h2 id="big"> (d) <h2 class="big">
- 2.🎨 Which tag connects an outside CSS file? (a) <img> (b) <a> (c) <link> (d) <css>
- 3.🚀 Which file should this code go in: <p>Hello!</p> (a) index.html (b) style.css (c) script.js
- 4.🌗 Is red on green easy or hard to read? (a) easy to read (b) hard to read
- 5.True or false: HTML on its own can make links to pages. (a) False (b) True
-
6.✍️ How many declarations (property: value pairs) are in this rule?
h1 {
text-align: center;
color: red;
font-size: 20px;
margin: 10px;
} -
7.🔍 Which line is missing its closing tag?
line 1: <strong>Good morning!</strong>
line 2: <p>Fun facts</p>
line 3: <i>Cricket is fun. (a) line 3 (b) line 2 (c) line 1 - 8.🧭 How many <main> parts should a page have? (a) ten (b) one (c) none (d) three
-
9.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 6; i++) {
total = total + i;
}
console.log(total); - 10.True or false: margin is the gap to other boxes. (a) False (b) True
-
11.⚖️ What colour is the text of this element?
<h1 class="big" id="logo">Hi</h1>
CSS:
.big { color: yellow; }
#logo { color: red; }
h1 { color: black; } (a) yellow (b) black (c) red (d) orange - 12.What does justify-content: flex-start do? (a) packs boxes at the start (b) equal gaps, none at ends (c) puts boxes in the middle (d) packs boxes at the end
-
13.📱 The screen is 540px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (max-width: 480px) {
p {
font-size: 6px;
}
} (a) Yes (b) No - 14.Which of these does JavaScript do? (a) makes a link (b) reacts to a button click (c) puts a picture on a page (d) makes headings and lists
-
15.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (max-width: 768px) {
p {
font-size: 12px;
}
} -
16.📊 How many cells are in each row?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
<tr><td>Grapes</td><td>Papaya</td><td>Orange</td></tr>
<tr><td>Mango</td><td>Guava</td><td>Banana</td></tr>
<tr><td>Papaya</td><td>Grapes</td><td>Mango</td></tr>
</table> - 17.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h2> or <h3>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
- 18.True or false: <header> sits at the very top. (a) False (b) True
- 19.📊 Which tag makes one data cell? (a) <table> (b) <td> (c) <caption> (d) <th>
- 20.🔍 Which is the odd one out? (a) puts a picture on a page (b) makes a form box (c) makes headings and lists (d) rounds box corners
- 21.💪 Which flexbox property turns on flexbox? (a) display: flex (b) justify-content (c) align-items (d) gap
-
22.🖌️ What colour are the letters?
li {
color: purple;
text-align: right;
font-size: 12px;
background-color: green;
} (a) green (b) purple (c) yellow - 23.🎯 Which element does the selector div style? (a) <span> (b) <div class="star"> (c) <p class="star"> (d) <h1 id="main">
- 24.Which of these does JavaScript do? (a) counts down a timer (b) gives the page structure (c) changes the text size (d) sets colours and fonts
- 25.🌗 Is white on black easy or hard to read? (a) easy to read (b) hard to read
- 26.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
- 27.🖌️ Which CSS property picks the font style? (a) font-family (b) background-color (c) text-align (d) font-weight
- 28.📦 In the box model, which part is space outside the border? (a) content (b) margin (c) padding (d) border
-
29.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="300"> - 30.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
- 31.🎯 What kind of selector is #main? (a) an element selector (b) a class selector (c) an id selector
-
32.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Orange</li>
<li>Guava</li>
<li>Mango</li>
<li>Banana</li>
<li>Jamun</li>
</ol> - 33.🌍 What do we call the computer that stores a website? (a) a mouse (b) a server (c) a keyboard (d) a printer
-
34.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="250"> (a) fort.jpg (b) An old fort (c) tiger.jpg (d) kite.png - 35.🔢 In a basic web page file, which comes first: “</html>” or “</head>”? (a) </head> (b) </html>
-
36.🔗 Which address opens when you click this link?
<a href="art.html">Contact us</a> (a) news.html (b) quiz.html (c) art.html (d) Contact us - 37.📊 In a table, which tag is a row? (a) <th> (b) <tr> (c) <tb> (d) <td>
- 38.🎯 Which element does the selector .star style? (a) <h2 class="menu"> (b) <h2 class="star"> (c) <li class="note"> (d) <h2 id="star">
-
39.📦 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: 4px solid black;
margin: 20px;
} - 40.🌈 Which colour of light is strongest in rgb(3, 121, 215)? (a) blue (b) red (c) green
Answer key
- <h2 class="big">
- <link>
- index.html
- hard to read
- True
- 4
- line 3
- one
- 21
- True
- red
- packs boxes at the start
- No
- reacts to a button click
- 12
- 3
- <h4>
- True
- <td>
- rounds box corners
- display: flex
- purple
- <div class="star">
- counts down a timer
- easy to read
- in the body
- font-family
- margin
- 300
- <ul>
- an id selector
- 6
- a server
- fort.jpg
- </head>
- art.html
- <tr>
- <h2 class="star">
- 258
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids