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.🔁 When does the else part run? (a) never (b) when if is false (c) always (d) when if is true
- 2.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
- 3.🚀 Which program lets you see your web page while you build it? (a) a calculator (b) a music player (c) a photo viewer (d) a web browser
- 4.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a dot (c) as 5 spaces (d) as a new line
- 5.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 6.🔁 Which loop repeats code a set number of times? (a) if (b) else (c) let (d) for
- 7.True or false: HTML makes headings and lists. (a) True (b) False
- 8.🌗 Is dark grey on white easy or hard to read? (a) easy to read (b) hard to read
-
9.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (max-width: 768px) {
p {
font-size: 12px;
}
} -
10.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>I love mangoes.</p>
<p>Hello, world!</p> (a) Fun facts (b) Hello, world! (c) I love mangoes. - 11.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <p> (d) <li>
-
12.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="checkbox" name="fruit"> Litchi
<input type="checkbox" name="fruit"> Banana
<input type="checkbox" name="fruit"> Guava
</form> - 13.📱 max-width: 600px applies when the screen is ___. (a) 600px or wider (b) turned off (c) exactly 1000px (d) 600px or narrower
-
14.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 340px;
justify-content: center;
}
Inside are 3 boxes, each 100px wide (no margins). - 15.🔁 What does i++ do? (a) prints i (b) doubles i (c) adds 1 to i (d) takes 1 from i
- 16.🔒 What does the lock (HTTPS) in the address bar mean? (a) the data is scrambled (b) the site is free (c) the site is a game (d) the site is fast
-
17.🔍 One closing tag is missing. Which one?
<h2>My pets</h2>
<i>I love mangoes.
<h1>My best friend</h1> (a) </h1> (b) </h2> (c) </p> (d) </i> - 18.True or false: <td> makes one data cell. (a) True (b) False
-
19.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (max-width: 768px) {
p {
font-size: 14px;
}
} - 20.🎨 Which tag connects an outside CSS file? (a) <link> (b) <img> (c) <css> (d) <a>
- 21.✍️ How does a CSS comment start? (a) <!-- (b) // (c) /* (d) #
-
22.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Hello, world!</p>
<p>My pets</p>
<h2>Our school trip</h2>
<h2>Fun facts</h2> - 23.📄 Can HTML on its own run a game loop? (a) Yes (b) No
- 24.True or false: h1 is an element selector. (a) False (b) True
- 25.🖌️ Which CSS property picks the font style? (a) text-align (b) font-family (c) color (d) font-weight
-
26.✍️ Which property is set to 2px solid in this rule?
.note {
text-align: center;
border: 2px solid;
font-style: italic;
} (a) width (b) 2px solid (c) font-style (d) border -
27.⚡ What does this code show?
let name = "Riya";
console.log("Welcome, " + name + "!"); (a) Riya (b) Welcome, name! (c) name (d) Welcome, Riya! -
28.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>Cricket is fun.</h2>
<h2>Our school trip</h2> - 29.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 30.⚡ Which tag holds JavaScript in a page? (a) <style> (b) <script> (c) <code> (d) <js>
- 31.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) <head>
- 32.🎨 Which attribute adds CSS inside one tag? (a) src (b) alt (c) href (d) style
- 33.📛 In <a href="x.html">, what is href? (a) an attribute (b) an element name (c) a comment (d) a closing tag
- 34.🌈 In #910000 the red part is the hex number 91. What is it as a normal number?
- 35.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the first one (b) the shorter one (c) neither (d) the later one
-
36.✍️ What value is given to background-color in this rule?
body {
border: 2px solid;
background-color: yellow;
font-style: italic;
} (a) 10px (b) 8px (c) background-color (d) yellow - 37.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 38.🌈 Which colour is #000000? (a) white (b) magenta (c) yellow (d) black
-
39.🔗 Where does this link open?
<a href="about.html">Visit the site</a> (a) in the same tab (b) in a new tab -
40.🔁 What does this code print?
let age = 17;
if (age >= 37) {
console.log("teen");
} else {
console.log("child");
} (a) child (b) teen
Answer key
- when if is false
- True
- a web browser
- as one space
- an opening tag
- for
- True
- easy to read
- 12
- Fun facts
- <li>
- 3
- 600px or narrower
- 20
- adds 1 to i
- the data is scrambled
- </i>
- True
- 14
- <link>
- /*
- 3
- No
- True
- font-family
- border
- Welcome, Riya!
- 1
- No
- <script>
- <!DOCTYPE html>
- style
- an attribute
- 145
- the later one
- yellow
- Yes
- black
- in the same tab
- child
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids