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 list shows the steps of a recipe best? (a) <ol> (b) <br> (c) <hr> (d) <ul>
- 2.True or false: to type a password on http is not safe. (a) False (b) True
-
3.⚡ What does this code show?
let name = "Aman";
console.log("Hi, " + name + "!"); (a) Aman (b) Hi, name! (c) Hi, Aman! (d) name - 4.True or false: <li> lists things in any order. (a) False (b) True
- 5.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) attribute (d) element
-
6.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>The red kite</p> -->
<p>Good morning!</p> (a) Good morning! (b) My best friend (c) The red kite -
7.✍️ Which property is set to yellow in this rule?
h2 {
background-color: yellow;
border: 2px solid;
font-weight: bold;
} (a) yellow (b) background-color (c) padding (d) margin - 8.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) alt (c) src (d) width
- 9.True or false: <title> goes in the head. (a) False (b) True
- 10.Which of these does CSS do? (a) counts down a timer (b) gives the page structure (c) changes the text size (d) makes a form box
-
11.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>The red kite</p>
<p>My pets</p> -
12.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="400"> (a) map.png (b) cake.jpg (c) kite.png (d) A red kite - 13.🌈 In #000021 the blue part is the hex number 21. What is it as a normal number?
-
14.🔍 Which line is missing its closing tag?
line 1: <h1>Rain today</h1>
line 2: <small>Good morning!</small>
line 3: <u>The red kite (a) line 3 (b) line 2 (c) line 1 -
15.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p>
<p>Our school trip</p>
<p>My pets</p> (a) I love mangoes. (b) Our school trip (c) The red kite (d) My pets - 16.⚡ Which JavaScript word writes in the console? (a) let (b) console.log() (c) if (d) for
- 17.True or false: HTML makes a form box. (a) False (b) True
-
18.📱 The screen is 414px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (min-width: 768px) {
p {
font-size: 24px;
}
} - 19.🎯 Can many elements share the same class? (a) No (b) Yes
- 20.🌍 What does a web address (URL) tell the browser? (a) how old you are (b) where the page is (c) the page colour (d) your password
-
21.🔗 Where does this link open?
<a href="art.html">Maths fun</a> (a) in a new tab (b) in the same tab - 22.🚀 Which tag loads script.js into a page? (a) <a href="script.js"> (b) <script src="script.js"> (c) <link script.js> (d) <js src="script.js">
- 23.What does justify-content: flex-start do? (a) packs boxes at the end (b) puts boxes in the middle (c) equal gaps, none at ends (d) packs boxes at the start
-
24.🌍 What is the protocol in this URL?
http://learn.example.com/news/today.html (a) learn.example.com (b) https (c) /news/today.html (d) http - 25.True or false: <style> goes in the head. (a) True (b) False
- 26.True or false: .box { padding: 8px; } goes in script.js. (a) False (b) True
- 27.🛡️ Is it safe to use the same password on every site? (a) Yes (b) No
- 28.True or false: #hero is a class selector. (a) True (b) False
-
29.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 220px;
padding: 5px;
border: 1px solid black;
margin: 5px;
} -
30.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>My pets</p>
<!-- <p>I love mangoes.</p> --> -
31.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Banana</li>
<li>Guava</li>
</ol> -
32.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 50px;
padding: 5px;
border: 4px solid black;
margin: 0px;
} -
33.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Birds sing<br>Sky is blue</p> - 34.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) Home Text (c) HyperText (d) Hot Tags
- 35.🚀 Which file should this code go in: <p>Hello!</p> (a) style.css (b) script.js (c) index.html
-
36.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (min-width: 768px) {
p {
font-size: 28px;
}
} -
37.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Papaya</li>
<li>Grapes</li>
</ul> (a) bullets (b) numbers - 38.📱 Responsive design means a page ___. (a) is only for laptops (b) has no pictures (c) never changes (d) fits every screen
- 39.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 40.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as a new line (c) as 5 spaces (d) as one space
Answer key
- <ol>
- True
- Hi, Aman!
- False
- element
- The red kite
- background-color
- width
- True
- changes the text size
- 1
- kite.png
- 33
- line 3
- I love mangoes.
- console.log()
- True
- 16
- Yes
- where the page is
- in the same tab
- <script src="script.js">
- packs boxes at the start
- http
- True
- False
- No
- False
- 242
- 1
- 3
- 68
- 3
- HyperText
- index.html
- 20
- bullets
- fits every screen
- Yes
- as one space
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids