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 value is given to font-size in this rule?
.box {
margin: 10px;
font-size: 20px;
font-style: italic;
font-weight: bold;
} (a) yellow (b) font-size (c) 20px (d) center - 2.True or false: <table> makes one table row. (a) True (b) False
- 3.🚀 Which file should this code go in: alert("Hi"); (a) script.js (b) index.html (c) style.css
- 4.Which of these does HTML do? (a) changes the page live (b) puts a picture on a page (c) adds space around boxes (d) sets colours and fonts
- 5.⚡ Which word makes a new variable? (a) put (b) give (c) make (d) let
- 6.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
-
7.🔗 Which address opens when you click this link?
<a href="contact.html">Take the quiz</a> (a) https://example.com (b) maths.html (c) contact.html (d) Take the quiz - 8.What does justify-content: flex-start do? (a) packs boxes at the end (b) equal gaps, none at ends (c) puts boxes in the middle (d) packs boxes at the start
- 9.♿ Does this help everyone, or make the page harder to use: write clear link text? (a) makes it harder (b) helps everyone
- 10.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
- 11.What is <input type="text"> for? (a) picks a day (b) hides what you type (c) is for one line of words (d) lets you tick many
- 12.Which of these is a closing tag? (a) <p> (b) <h1> (c) <li> (d) </b>
-
13.🎯 Which CSS selector matches this element?
<p class="star" id="top">Hello</p> (a) p (b) #intro (c) .top (d) #star -
14.📱 The screen is 820px wide. Does the rule inside @media apply?
p {
font-size: 24px;
}
@media (min-width: 768px) {
p {
font-size: 32px;
}
} (a) No (b) Yes - 15.📊 Which tag gives the table a title? (a) <th> (b) <table> (c) <td> (d) <caption>
- 16.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) alt (c) width (d) src
- 17.What is <input type="checkbox"> for? (a) is for an email address (b) lets you tick many (c) hides what you type (d) lets you pick only one
- 18.⚖️ Which selector is the strongest? (a) an element selector (b) a class selector (c) an id selector
- 19.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <h6> (d) <p>
- 20.⚡ Which JavaScript word writes in the console? (a) for (b) alert() (c) console.log() (d) if
-
21.✍️ What value is given to font-weight in this rule?
h2 {
font-weight: bold;
font-size: 20px;
background-color: yellow;
padding: 8px;
} (a) 300px (b) bold (c) font-weight (d) 2px solid -
22.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Banana</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Guava</li>
</ol> - 23.🛡️ Online: is it safe to log out on shared PCs? (a) not safe (b) safe
- 24.🎨 A CSS file usually ends with which extension? (a) .css (b) .png (c) .html (d) .js
-
25.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 9; i++) {
total = total + i;
}
console.log(total); - 26.Which of these goes in the body? (a) <title> (b) <p> (c) <style> (d) <meta charset="utf-8">
- 27.📦 In the box model, which part is the gap to other boxes? (a) padding (b) border (c) margin (d) content
-
28.🔍 Which line is missing its closing tag?
line 1: <i>Cricket is fun.
line 2: <strong>My pets</strong>
line 3: <p>Good morning!</p> (a) line 1 (b) line 3 (c) line 2 - 29.🔤 In “HTML”, what does the L stand for? (a) Line (b) Language (c) Link (d) Laptop
- 30.Which of these is true of a code editor? (a) sends pages over the net (b) shows pages from the web (c) answers page requests (d) colours code to help us
- 31.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 32.💪 Which justify-content value packs boxes at the start? (a) center (b) flex-start (c) flex-end (d) space-between
- 33.🎯 Which sign starts a class selector? (a) & (b) . (c) @ (d) #
- 34.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
-
35.🌍 What is the protocol in this URL?
http://school.example.in/about.html (a) https (b) http (c) school.example.in (d) /about.html - 36.🧭 Is <article> semantic or not semantic? (a) not semantic (b) semantic
- 37.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) the first one (c) the later one (d) neither
- 38.True or false: .big is an element selector. (a) False (b) True
- 39.📊 Which tag makes one table row? (a) <th> (b) <tr> (c) <td> (d) <table>
-
40.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Grapes</li>
<li>Guava</li>
</ul>
Answer key
- 20px
- False
- script.js
- puts a picture on a page
- let
- blue
- contact.html
- packs boxes at the start
- helps everyone
- in the head
- is for one line of words
- </b>
- p
- Yes
- <caption>
- height
- lets you tick many
- an id selector
- <h6>
- console.log()
- bold
- 3
- safe
- .css
- 45
- <p>
- margin
- line 1
- Language
- colours code to help us
- an opening tag
- flex-start
- .
- in the body
- http
- semantic
- the later one
- False
- <tr>
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids