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 JavaScript word makes a new variable? (a) console.log() (b) for (c) let (d) if
- 2.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
3.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="300"> (a) Map of India (b) Birthday cake (c) width (d) map.png - 4.True or false: <th> gives the table a title. (a) False (b) True
-
5.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Visit the site</a> (a) in the same tab (b) in a new tab - 6.🖌️ Which CSS property makes the text bold? (a) font-family (b) font-size (c) font-weight (d) background-color
-
7.📱 The screen is 375px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (min-width: 768px) {
p {
font-size: 18px;
}
} (a) Yes (b) No - 8.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
9.✍️ Which property is set to 20px in this rule?
.box {
font-style: italic;
margin: 10px;
font-size: 20px;
border: 2px solid;
} (a) font-size (b) 20px (c) text-align (d) background-color - 10.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to colour it (d) to describe the image
- 11.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 12.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h6>? (a) <h2> (b) <h6> (c) <h3> (d) <h1>
- 13.What is <input type="radio"> for? (a) is for an email address (b) sends the form (c) lets you pick only one (d) takes only numbers
-
14.🔁 What does this code print?
let marks = 8;
if (marks < 6) {
console.log("Pass");
} else {
console.log("Try again");
} (a) Try again (b) Pass - 15.🖼️ Which attribute of <img> describes the picture? (a) alt (b) height (c) src (d) width
- 16.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a slash / (d) a dot .
-
17.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Hello, world!</p>
<p>Fun facts</p> - 18.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
- 19.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) red (d) black
-
20.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (min-width: 768px) {
p {
font-size: 28px;
}
} -
21.🔗 Which address opens when you click this link?
<a href="https://example.com">About us</a> (a) About us (b) art.html (c) https://example.com (d) maths.html -
22.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>My best friend</p> - 23.🎯 Which element does the selector p style? (a) <p class="menu"> (b) <h1> (c) <li id="top"> (d) <h2 class="menu">
- 24.🖌️ Which CSS property colours behind the text? (a) background-color (b) font-family (c) font-size (d) color
-
25.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Our school trip</p>
<h2>Our school trip</h2>
<h4>Rain today</h4>
<p>Our school trip</p> - 26.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) at the bottom (d) nowhere
-
27.🌍 What is the protocol in this URL?
http://kids.example.org/index.html (a) https (b) http (c) kids.example.org (d) /index.html - 28.🎨 Which attribute adds CSS inside one tag? (a) src (b) style (c) alt (d) href
-
29.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
p {
font-size: 24px;
}
@media (min-width: 768px) {
p {
font-size: 26px;
}
} -
30.🎯 Which CSS selector matches this element?
<p class="note" id="top">Hello</p> (a) .big (b) .note (c) #note (d) .top - 31.True or false: <input type="submit"> sends the form. (a) True (b) False
-
32.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="checkbox" name="sport"> Kabaddi
<input type="checkbox" name="sport"> Chess
<input type="checkbox" name="sport"> Football
</form> -
33.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h4>Fun facts</h4>
<p>Our school trip</p> -
34.✍️ What value is given to font-style in this rule?
p {
background-color: yellow;
width: 300px;
font-style: italic;
font-size: 20px;
} (a) font-style (b) 20px (c) red (d) italic - 35.True or false: <h1> has a closing tag. (a) True (b) False
-
36.🔗 Which words do you click on?
<a href="games.html">Play games</a> (a) href (b) About us (c) Play games (d) games.html - 37.🌈 Which colour of light is strongest in rgb(241, 32, 119)? (a) blue (b) green (c) red
- 38.📊 Which tag makes a heading cell? (a) <caption> (b) <th> (c) <tr> (d) <td>
- 39.True or false: body is a class selector. (a) False (b) True
- 40.True or false: <b> is an empty tag. (a) True (b) False
Answer key
- let
- Yes
- Map of India
- False
- in a new tab
- font-weight
- No
- has a closing tag
- font-size
- to describe the image
- Yes
- <h6>
- lets you pick only one
- Try again
- alt
- a slash /
- 1
- False
- red
- 20
- https://example.com
- 1
- <p class="menu">
- background-color
- 3
- on the browser tab
- http
- style
- 24
- .note
- True
- 3
- 2
- italic
- True
- Play games
- red
- <th>
- False
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids