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.🔐 Is abcd1234 a strong or a weak password? (a) strong (b) weak
- 2.🌈 Which colour of light is strongest in rgb(36, 232, 136)? (a) green (b) red (c) blue
- 3.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) opens it in a new tab (d) makes it bold
- 4.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 5.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
- 6.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) click it twice (b) share it with friends (c) type the password (d) close it, tell an adult
- 7.💬 Does the browser show comments on the page? (a) Yes (b) No
-
8.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> - 9.📝 Which input type takes only numbers? (a) radio (b) password (c) text (d) number
- 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 4 (d) 6
- 11.🔁 Which loop repeats code a set number of times? (a) if (b) let (c) else (d) for
-
12.⚖️ What colour is the text of this element?
<h2 class="star" id="logo">Hi</h2>
CSS:
#logo { color: yellow; }
.star { color: black; }
h2 { color: red; } (a) yellow (b) orange (c) black (d) red - 13.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) attribute (c) editor (d) element
- 14.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) height (d) alt
- 15.Which of these is a strong password? (a) 123456 (b) Blue@Tiger_74 (c) password (d) abcd1234
-
16.✍️ What is the selector in this CSS rule?
body {
width: 300px;
padding: 8px;
text-align: center;
color: red;
} (a) 8px (b) body (c) width (d) .box -
17.⚡ What does this code print? (Look at the quotes!)
let x = "8";
let y = 3;
console.log(x + y); (a) Error (b) 83 (c) 11 - 18.True or false: <ul> is an ordered list. (a) True (b) False
- 19.🔍 Which is the odd one out? (a) gives the page structure (b) counts down a timer (c) checks a quiz answer (d) shows a pop-up message
- 20.True or false: to share your OTP is safe. (a) False (b) True
- 21.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Machine (d) Markup
-
22.📊 How many cells does this table have in all?
<table>
<tr><td>Orange</td><td>Grapes</td><td>Papaya</td><td>Banana</td></tr>
<tr><td>Litchi</td><td>Guava</td><td>Guava</td><td>Banana</td></tr>
<tr><td>Grapes</td><td>Papaya</td><td>Papaya</td><td>Guava</td></tr>
<tr><td>Jamun</td><td>Guava</td><td>Banana</td><td>Grapes</td></tr>
</table> - 23.🚀 What is the home page file of a website usually called? (a) start.js (b) home.css (c) main.png (d) index.html
- 24.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
25.✍️ How many declarations (property: value pairs) are in this rule?
h1 {
text-align: center;
padding: 8px;
font-size: 20px;
} -
26.🔍 One closing tag is missing. Which one?
<b>Fun facts
<u>Rain today</u>
<h1>My best friend</h1> (a) </i> (b) </u> (c) </h1> (d) </b> - 27.True or false: h1 { font-size: 32px; } goes in index.html. (a) False (b) True
-
28.⚖️ What colour is the text of this element?
<h2 class="box" id="hero">Hi</h2>
CSS:
.box { color: black; }
.box { color: purple; } (a) purple (b) black (c) yellow (d) green - 29.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <pic> (d) <a>
-
30.🎯 Which CSS selector matches this element?
<h2 class="box" id="top">Hello</h2> (a) .top (b) #box (c) h2 (d) li -
31.🔗 Which words do you click on?
<a href="maths.html">Contact us</a> (a) Contact us (b) maths.html (c) href (d) Visit the site - 32.🔁 What does i++ do? (a) doubles i (b) prints i (c) takes 1 from i (d) adds 1 to i
- 33.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
- 34.Which of these is true of <main>? (a) holds copyright notes (b) holds the menu of links (c) holds the main content (d) holds the logo and title
-
35.✍️ What is the selector in this CSS rule?
h2 {
text-align: center;
color: red;
background-color: yellow;
} (a) text-align (b) h1 (c) h2 (d) red -
36.🔁 How many times does this code print “Hello”?
for (let i = 2; i < 11; i++) {
console.log("Hello");
} - 37.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
-
38.📊 How many cells does this table have in all?
<table>
<tr><td>Guava</td><td>Mango</td><td>Jamun</td><td>Guava</td></tr>
<tr><td>Orange</td><td>Jamun</td><td>Guava</td><td>Jamun</td></tr>
</table> - 39.True or false: <h1>My Site</h1> goes in index.html. (a) True (b) False
- 40.🧩 Which language gives the page structure? (a) CSS (b) JavaScript (c) HTML
Answer key
- weak
- green
- opens it in a new tab
- in the head
- No
- close it, tell an adult
- No
- 100
- number
- 3
- for
- yellow
- element
- src
- Blue@Tiger_74
- body
- 83
- False
- gives the page structure
- False
- Markup
- 16
- index.html
- has a closing tag
- 3
- </b>
- False
- purple
- <img>
- h2
- Contact us
- adds 1 to i
- to leave notes
- holds the main content
- h2
- 9
- <ol>
- 8
- True
- HTML
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids