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.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) <body> (c) </body> (d) <!DOCTYPE html>
- 2.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
-
3.⚡ What does this code show?
let name = "Arjun";
alert("Hi, " + name + "!"); (a) Arjun (b) Hi, name! (c) Hi, Arjun! (d) name - 4.Which of these is true of <header>? (a) holds the main content (b) holds copyright notes (c) sits at the very top (d) holds a news story
-
5.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>My pets</p>
<p>Good morning!</p>
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> --> - 6.🎯 Can many elements share the same class? (a) Yes (b) No
- 7.🖌️ Which CSS property picks the font style? (a) color (b) font-weight (c) font-family (d) background-color
- 8.True or false: <input type="number"> is for one line of words. (a) True (b) False
-
9.🔗 Which words do you click on?
<a href="games.html">About us</a> (a) games.html (b) href (c) About us (d) Contact us -
10.🌍 What is the path in this URL?
https://www.example.net/maths/tables.html (a) https (b) /maths/tables.html (c) /index.html (d) www.example.net - 11.🔁 Which word runs code only when something is true? (a) log (b) let (c) if (d) for
- 12.🎯 Which sign starts an id selector? (a) & (b) . (c) # (d) @
- 13.True or false: HTTPS scrambles data on its way. (a) False (b) True
- 14.📊 Are <th> cells shown bold and centred by default? (a) No (b) Yes
- 15.💬 How does an HTML comment start? (a) # (b) <!-- (c) // (d) /*
- 16.Which of these is a closing tag? (a) <body> (b) <title> (c) </p> (d) <h1>
-
17.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<h2>I love mangoes.</h2>
<p>I love mangoes.</p>
<h2>The red kite</h2> - 18.🌍 Which one is the page’s address? (a) the URL (b) the server (c) the browser (d) HTTPS
- 19.🌈 In #00be00 the green part is the hex number be. What is it as a normal number?
-
20.🔗 Which address opens when you click this link?
<a href="quiz.html">Play games</a> (a) quiz.html (b) Play games (c) games.html (d) about.html - 21.🧭 Is <div> semantic or not semantic? (a) semantic (b) not semantic
-
22.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="radio" name="colour"> Blue
<input type="radio" name="colour"> Green
<input type="radio" name="colour"> Orange
</form> - 23.🔁 What does i++ do? (a) adds 1 to i (b) takes 1 from i (c) prints i (d) doubles i
-
24.📊 How many rows does this table have?
<table>
<tr><td>Grapes</td><td>Papaya</td><td>Jamun</td><td>Guava</td></tr>
<tr><td>Banana</td><td>Grapes</td><td>Papaya</td><td>Banana</td></tr>
</table> - 25.🎯 What kind of selector is body? (a) an id selector (b) an element selector (c) a class selector
- 26.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
- 27.📱 What does a media query check? (a) the battery level (b) the page title (c) the time of day (d) the screen width
- 28.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h6> or <h4>? (a) <h6> (b) <h4> (c) <h5> (d) <h2>
- 29.Which of these is an opening tag? (a) <b> (b) </body> (c) </li> (d) </p>
-
30.✍️ Which property is set to 10px in this rule?
h2 {
font-style: italic;
font-weight: bold;
text-align: center;
margin: 10px;
} (a) padding (b) margin (c) 10px (d) font-weight -
31.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 330px;
justify-content: flex-start;
}
Inside are 4 boxes, each 80px wide (no margins). -
32.🔒 Is the connection to this address scrambled (encrypted)?
https://www.example.com/index.html (a) No (b) Yes - 33.🚀 Which file should this code go in: body { margin: 0; } (a) index.html (b) script.js (c) style.css
-
34.⚡ What number does this code print?
let a = 10;
let b = 4;
console.log(a * b); - 35.🧭 Which semantic tag holds extra side notes? (a) <footer> (b) <nav> (c) <aside> (d) <article>
- 36.📝 Which tag holds a whole form? (a) <form> (b) <ol> (c) <table> (d) <input>
-
37.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>My best friend</p>
<p>Good morning!</p> (a) My best friend (b) Rain today (c) Good morning! - 38.Which of these is safe to do online? (a) log out on shared PCs (b) download from pop-ups (c) post your home address (d) share your password
-
39.⚡ What does this code print? (Look at the quotes!)
let x = "6";
let y = 6;
console.log(x + y); (a) 66 (b) 12 (c) Error -
40.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="100"> (a) moon.png (b) Our school bus (c) width (d) The full moon
Answer key
- <!DOCTYPE html>
- in the head
- Hi, Arjun!
- sits at the very top
- 3
- Yes
- font-family
- False
- About us
- /maths/tables.html
- if
- #
- True
- Yes
- <!--
- </p>
- 2
- the URL
- 190
- quiz.html
- not semantic
- 1
- adds 1 to i
- 2
- an element selector
- red
- the screen width
- <h2>
- <b>
- margin
- 10
- Yes
- style.css
- 40
- <aside>
- <form>
- Rain today
- log out on shared PCs
- 66
- The full moon
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids