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.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 2.✍️ Which sign ends each CSS declaration? (a) , (b) ; (c) . (d) :
-
3.⚡ What number does this code print?
let a = 6;
let b = 2;
console.log(a * b); - 4.Which colour pair is easy to read? (a) pink on red (b) blue on purple (c) red on green (d) white on dark blue
- 5.🎯 Which sign starts a class selector? (a) @ (b) # (c) . (d) &
- 6.True or false: <table> makes one table row. (a) False (b) True
- 7.True or false: alert("Hi"); goes in style.css. (a) True (b) False
- 8.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h4> or <h2>? (a) <h3> (b) <h2> (c) <h4> (d) <h5>
- 9.Which of these is true of a code editor? (a) opens web pages for us (b) answers page requests (c) colours code to help us (d) has an address bar
- 10.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
-
11.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) width (b) A happy dog (c) The full moon (d) dog.jpg -
12.🔍 Which line is missing its closing tag?
line 1: <h1>I love mangoes.</h1>
line 2: <b>My best friend
line 3: <strong>Rain today</strong> (a) line 1 (b) line 2 (c) line 3 -
13.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Our school trip</p>
<!-- <p>Good morning!</p> -->
<p>The red kite</p> (a) Good morning! (b) The red kite (c) Our school trip (d) My pets - 14.💬 How does an HTML comment end? (a) >> (b) */ (c) --> (d) //
-
15.✍️ How many declarations (property: value pairs) are in this rule?
.note {
border: 2px solid;
font-weight: bold;
font-style: italic;
text-align: center;
} - 16.True or false: in <img>, height shows if the image fails. (a) True (b) False
- 17.True or false: <img> has a closing tag. (a) False (b) True
-
18.⚡ What does this code show?
let name = "Aman";
alert("Welcome, " + name + "!"); (a) Welcome, Aman! (b) Welcome, name! (c) name (d) Aman -
19.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 160px;
padding: 10px;
border: 1px solid black;
margin: 20px;
} -
20.✍️ How many declarations (property: value pairs) are in this rule?
li {
font-weight: bold;
font-style: italic;
} - 21.🧩 Which language changes the page live? (a) CSS (b) JavaScript (c) HTML
- 22.True or false: #main is an id selector. (a) True (b) False
-
23.🔍 One closing tag is missing. Which one?
<b>Our school trip
<strong>Fun facts</strong>
<u>Good morning!</u> (a) </em> (b) </b> (c) </u> (d) </strong> -
24.✍️ What is the selector in this CSS rule?
.note {
background-color: yellow;
font-size: 20px;
text-align: center;
} (a) #top (b) 20px (c) .note (d) background-color -
25.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Birds sing<br>Stars shine<br>Sky is blue</p> - 26.🔍 Which is the odd one out? (a) reacts to a button click (b) changes the page live (c) counts down a timer (d) changes the text size
- 27.🌈 In #dd0000 the red part is the hex number dd. What is it as a normal number?
-
28.♿ Is this heading order correct (no level skipped)?
<h1> → <h2> → <h4> → <h4> (a) Yes (b) No -
29.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>My best friend</p>
<!-- <p>Our school trip</p> -->
<!-- <p>Rain today</p> -->
<p>The red kite</p> - 30.🧭 Which semantic tag helps you move around? (a) <article> (b) <main> (c) <header> (d) <nav>
- 31.💪 Which flexbox property turns on flexbox? (a) flex-direction (b) display: flex (c) align-items (d) justify-content
- 32.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
-
33.🔍 One closing tag is missing. Which one?
<u>Hello, world!</u>
<h1>Good morning!
<em>My pets</em> (a) </u> (b) </b> (c) </h1> (d) </em> -
34.🔍 One closing tag is missing. Which one?
<h3>Our school trip</h3>
<h2>Hello, world!
<h1>Cricket is fun.</h1> (a) </em> (b) </h2> (c) </h1> (d) </h3> - 35.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*
- 36.Which of these is not safe to do online? (a) keep passwords secret (b) download from pop-ups (c) ask before downloading (d) use a nickname in games
- 37.⚡ A JavaScript file usually ends with which extension? (a) .js (b) .css (c) .jpg (d) .html
-
38.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 190px;
justify-content: flex-end;
}
Inside are 3 boxes, each 40px wide (no margins). -
39.🔁 What does this code print?
let age = 14;
if (age >= 12) {
console.log("teen");
} else {
console.log("child");
} (a) child (b) teen -
40.🌍 What is the domain name in this URL?
https://kids.example.org/maths/tables.html (a) kids.example.org (b) https (c) school.example.in (d) /maths/tables.html
Answer key
- No
- ;
- 12
- white on dark blue
- .
- False
- False
- <h2>
- colours code to help us
- in the head
- A happy dog
- line 2
- Good morning!
- -->
- 4
- False
- False
- Welcome, Aman!
- 222
- 2
- JavaScript
- True
- </b>
- .note
- 4
- changes the text size
- 221
- No
- 3
- <nav>
- display: flex
- <a>
- </h1>
- </h2>
- <!--
- download from pop-ups
- .js
- 70
- teen
- kids.example.org
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids