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.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to add colour (d) to show pictures
- 2.📝 Which tag gives a form box a name you can click? (a) <h1> (b) <label> (c) <title> (d) <hr>
- 3.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dot . (d) a dollar $
-
4.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) tiger.jpg (b) A tiger asleep (c) kite.png (d) map.png -
5.✍️ Which property is set to red in this rule?
h2 {
font-size: 20px;
width: 300px;
padding: 8px;
color: red;
} (a) font-size (b) color (c) red (d) text-align - 6.⚡ Which JavaScript word shows a pop-up box? (a) for (b) let (c) if (d) alert()
- 7.🔢 When you open a web page, what comes right after “you type the URL”? (a) the browser asks it (b) the browser shows it (c) the server sends files (d) DNS finds the server
-
8.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="50"> (a) Map of India (b) width (c) A red kite (d) kite.png - 9.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the body (d) the head
- 10.Which of these is a weak password? (a) Kite_Fl1es@Dawn (b) S0lar!Pen#8 (c) Mango#Kite29! (d) 111111
-
11.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Mango</li>
<li>Orange</li>
</ol> (a) bullets (b) numbers -
12.🔍 Which line is missing its closing tag?
line 1: <i>Good morning!</i>
line 2: <h1>Hello, world!</h1>
line 3: <h2>Cricket is fun. (a) line 2 (b) line 1 (c) line 3 - 13.Which of these is an opening tag? (a) </title> (b) <body> (c) </li> (d) </b>
- 14.🌍 Which one asks for a web page? (a) HTTPS (b) the URL (c) the server (d) the browser
-
15.⚡ What number does this code print?
let a = 51;
let b = 12;
console.log(a - b); - 16.🌈 In #000069 the blue part is the hex number 69. What is it as a normal number?
-
17.🌍 What is the path in this URL?
http://www.example.com/index.html (a) /index.html (b) http (c) www.example.com (d) /art/gallery.html - 18.⚡ A JavaScript file usually ends with which extension? (a) .jpg (b) .html (c) .css (d) .js
- 19.🛡️ Online: is it safe to download from pop-ups? (a) not safe (b) safe
- 20.🌈 Which colour is #ffff00? (a) cyan (b) blue (c) red (d) yellow
- 21.🌈 In #000086 the blue part is the hex number 86. What is it as a normal number?
-
22.🔁 How many times does this code print “Hello”?
for (let i = 3; i <= 5; i++) {
console.log("Hello");
} -
23.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Papaya</li>
<li>Mango</li>
</ul> (a) numbers (b) bullets -
24.🔍 Which line is missing its closing tag?
line 1: <b>Fun facts</b>
line 2: <h3>The red kite
line 3: <strong>I love mangoes.</strong> (a) line 1 (b) line 2 (c) line 3 -
25.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p>
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p> -
26.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h2>My best friend</h2>
<p>Good morning!</p> -
27.✍️ How many declarations (property: value pairs) are in this rule?
body {
border: 2px solid;
} -
28.🔍 Which line is missing its closing tag?
line 1: <strong>Our school trip
line 2: <small>I love mangoes.</small>
line 3: <h2>Cricket is fun.</h2> (a) line 1 (b) line 2 (c) line 3 - 29.📛 In <a href="x.html">, what is href? (a) an element name (b) a closing tag (c) a comment (d) an attribute
-
30.⚖️ What colour is the text of this element?
<p class="menu" id="end">Hi</p>
CSS:
p { color: red; }
.menu { color: green; } (a) red (b) green (c) black (d) white -
31.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>My best friend</p>
<!-- <p>The red kite</p> -->
<!-- <p>My pets</p> -->
<p>Our school trip</p> - 32.🔁 When does the else part run? (a) always (b) when if is false (c) never (d) when if is true
- 33.🔍 Which is the odd one out? (a) turns HTML into a page (b) has an address bar (c) shows pages from the web (d) is where we type code
- 34.True or false: <header> sits at the bottom. (a) True (b) False
- 35.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h6> or <h2>? (a) <h5> (b) <h2> (c) <h1> (d) <h6>
-
36.⚖️ What colour is the text of this element?
<h1 class="note" id="main">Hi</h1>
CSS:
.note { color: blue; }
.note { color: red; } (a) blue (b) red (c) white (d) orange - 37.Which of these is a strong password? (a) qwerty (b) Blue@Tiger_74 (c) 111111 (d) iloveyou
- 38.🚀 Which file should this code go in: alert(score); (a) style.css (b) index.html (c) script.js
- 39.📦 In the box model, which part is space outside the border? (a) margin (b) padding (c) content (d) border
-
40.🔍 Which line is missing its closing tag?
line 1: <em>Fun facts
line 2: <h1>I love mangoes.</h1>
line 3: <h3>Our school trip</h3> (a) line 2 (b) line 3 (c) line 1
Answer key
- to leave notes
- <label>
- a slash /
- tiger.jpg
- color
- alert()
- DNS finds the server
- A red kite
- the body
- 111111
- numbers
- line 3
- <body>
- the browser
- 39
- 105
- /index.html
- .js
- not safe
- yellow
- 134
- 3
- bullets
- line 2
- 2
- 2
- 1
- line 1
- an attribute
- green
- 2
- when if is false
- is where we type code
- False
- <h1>
- red
- Blue@Tiger_74
- script.js
- margin
- line 1
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids