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: <input type="submit"> sends the form. (a) False (b) True
-
2.🔗 Where does this link open?
<a href="maths.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab -
3.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h2>My best friend</h2>
<p>Cricket is fun.</p>
<p>My pets</p> - 4.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
- 5.🔢 On a typical page, from top to bottom, which comes first: “<footer>” or “<header>”? (a) <footer> (b) <header>
- 6.✍️ Which sign goes between a property and its value? (a) = (b) - (c) ; (d) :
- 7.Which of these is a strong password? (a) riya2014 (b) S0lar!Pen#8 (c) 111111 (d) qwerty
- 8.🎨 Which tag holds CSS inside the head? (a) <body> (b) <script> (c) <style> (d) <css>
- 9.📱 What does a media query check? (a) the battery level (b) the time of day (c) the screen width (d) the page title
- 10.🔗 Which attribute holds the address of a link? (a) href (b) id (c) alt (d) src
- 11.📄 Can HTML on its own make links to pages? (a) No (b) Yes
- 12.True or false: in <img>, height shows if the image fails. (a) True (b) False
- 13.🔍 Which is the odd one out? (a) counts down a timer (b) puts a picture on a page (c) makes a link (d) makes headings and lists
- 14.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) [ (d) <
-
15.🖌️ How big is the text, in px?
h1 {
font-size: 12px;
background-color: orange;
text-align: right;
color: yellow;
} - 16.🔢 To build and share your first web page, what comes right after “test in a browser”? (a) add CSS styles (b) plan what to show (c) publish it online (d) write the HTML
- 17.🔢 To build and share your first web page, which comes first: “add CSS styles” or “plan what to show”? (a) add CSS styles (b) plan what to show
- 18.📊 Which tag holds the whole table? (a) <caption> (b) <td> (c) <table> (d) <th>
-
19.⚖️ What colour is the text of this element?
<p class="big" id="main">Hi</p>
CSS:
.big { color: green; }
.big { color: blue; } (a) blue (b) green (c) black (d) white - 20.Which of these is padding? (a) a solid or dotted edge (b) the text or picture (c) the line round the box (d) space inside the border
-
21.🔒 Is the connection to this address scrambled (encrypted)?
https://www.example.com/about.html (a) Yes (b) No - 22.Which of these is an opening tag? (a) </body> (b) </title> (c) </b> (d) <p>
- 23.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) width (c) src (d) alt
-
24.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Orange</li>
</ul> (a) bullets (b) numbers -
25.🔍 One closing tag is missing. Which one?
<small>Fun facts</small>
<h1>My best friend
<strong>Hello, world!</strong> (a) </small> (b) </strong> (c) </i> (d) </h1> - 26.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to load it faster (c) to colour it (d) to make it bigger
-
27.⚖️ What colour is the text of this element?
<h2 class="menu" id="logo">Hi</h2>
CSS:
#logo { color: white; }
.menu { color: red; } (a) green (b) orange (c) red (d) white - 28.🔁 When does the else part run? (a) when if is true (b) always (c) when if is false (d) never
- 29.True or false: CSS gives the page structure. (a) False (b) True
- 30.🔐 Is password a strong or a weak password? (a) weak (b) strong
- 31.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
- 32.🌈 Which colour is #ffffff? (a) cyan (b) black (c) blue (d) white
-
33.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 8; i++) {
total = total + i;
}
console.log(total); -
34.✍️ Which property is set to red in this rule?
p {
color: red;
border: 2px solid;
font-size: 20px;
} (a) text-align (b) font-size (c) red (d) color -
35.🔁 What does this code print?
let marks = 33;
if (marks < 25) {
console.log("Pass");
} else {
console.log("Try again");
} (a) Pass (b) Try again - 36.True or false: <style> goes in the body. (a) True (b) False
- 37.True or false: h1 is an id selector. (a) False (b) True
- 38.📝 Which input type is for an email address? (a) submit (b) email (c) checkbox (d) radio
-
39.📱 The screen is 1366px wide. Does the rule inside @media apply?
p {
font-size: 16px;
}
@media (max-width: 1024px) {
p {
font-size: 10px;
}
} (a) Yes (b) No - 40.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
Answer key
- True
- in a new tab
- 2
- No
- <header>
- :
- S0lar!Pen#8
- <style>
- the screen width
- href
- Yes
- False
- counts down a timer
- <
- 12
- publish it online
- plan what to show
- <table>
- blue
- space inside the border
- Yes
- <p>
- width
- bullets
- </h1>
- to describe the image
- white
- when if is false
- False
- weak
- 6
- white
- 36
- color
- Try again
- False
- False
- No
- <a>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids