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.🔁 How many times does this code print “Hello”?
for (let i = 0; i <= 4; i++) {
console.log("Hello");
} -
2.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<h2>I love mangoes.</h2>
<p>My pets</p>
<h2>Our school trip</h2>
<p>Our school trip</p> - 3.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
4.🔁 How many numbers does this code print?
for (let i = 0; i < 15; i = i + 3) {
console.log(i);
} -
5.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Orange</li>
</ol> (a) numbers (b) bullets -
6.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Rivers flow<br>Sky is blue</p> -
7.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 210px;
padding: 25px;
border: 3px solid black;
margin: 5px;
} - 8.True or false: .card is a class selector. (a) False (b) True
-
9.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Litchi</li>
</ul> (a) numbers (b) bullets - 10.True or false: <h1> goes in the body. (a) False (b) True
- 11.📋 Which list tag is an ordered list? (a) <li> (b) <ul> (c) <ol>
- 12.True or false: “add alt text to images” makes the page harder to use. (a) False (b) True
- 13.🌈 Which colour of light is strongest in rgb(217, 17, 15)? (a) green (b) red (c) blue
- 14.🔒 What does the lock (HTTPS) in the address bar mean? (a) the data is scrambled (b) the site is a game (c) the site is free (d) the site is fast
- 15.🌈 Which hex code is cyan? (a) #ff00ff (b) #ff0000 (c) #00ff00 (d) #00ffff
- 16.🧭 Which semantic tag holds extra side notes? (a) <footer> (b) <aside> (c) <nav> (d) <header>
- 17.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
- 18.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
- 19.🚀 Which file should this code go in: p { color: red; } (a) index.html (b) script.js (c) style.css
- 20.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) alt (d) src
-
21.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Match report</h1>
<p>I like to read.</p>
</body>
</html> (a) index.html (b) I like to read. (c) My Hobbies (d) Match report - 22.🏷️ Which is the closing tag for <b>? (a) <b/> (b) <\b> (c) <b> (d) </b>
- 23.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) height (d) alt
- 24.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
- 25.True or false: <input type="email"> takes only numbers. (a) True (b) False
- 26.True or false: HTML on its own cannot keep a high score. (a) False (b) True
- 27.Which of these is a closing tag? (a) <h1> (b) <p> (c) <li> (d) </title>
-
28.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="100"> -
29.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Guava</li>
</ul> -
30.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<!-- <p>Cricket is fun.</p> -->
<!-- <p>My pets</p> -->
<p>Good morning!</p> -
31.⚖️ What colour is the text of this element?
<h1 class="box" id="intro">Hi</h1>
CSS:
#intro { color: yellow; }
#intro { color: purple; } (a) orange (b) yellow (c) red (d) purple -
32.🖌️ How big is the text, in px?
h1 {
text-align: center;
font-size: 36px;
background-color: red;
color: yellow;
} -
33.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="400"> (a) dog.jpg (b) moon.png (c) cake.jpg (d) Birthday cake - 34.True or false: CSS makes headings and lists. (a) True (b) False
- 35.📊 Where do <td> cells go? (a) inside a <p> (b) inside the <head> (c) inside a <tr> (d) inside a <li>
- 36.🔍 Which is the odd one out? (a) adds space around boxes (b) makes a form box (c) puts a picture on a page (d) makes headings and lists
- 37.🛡️ Is it safe to use the same password on every site? (a) No (b) Yes
- 38.What does text-align do? (a) makes letters bigger (b) sets the letter colour (c) makes the text bold (d) centres a heading
- 39.🌈 In #7c0000 the red part is the hex number 7c. What is it as a normal number?
- 40.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
Answer key
- 5
- 3
- an opening tag
- 5
- numbers
- 3
- 266
- True
- bullets
- True
- <ol>
- False
- red
- the data is scrambled
- #00ffff
- <aside>
- 6
- <ul>
- style.css
- src
- My Hobbies
- </b>
- alt
- <!--
- False
- True
- </title>
- 100
- 2
- 1
- purple
- 36
- cake.jpg
- False
- inside a <tr>
- adds space around boxes
- No
- centres a heading
- 124
- in the body
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids