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.🔢 To build and share your first web page, which comes first: “publish it online” or “write the HTML”? (a) publish it online (b) write the HTML
-
2.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 280px;
justify-content: space-between;
}
Inside are 4 boxes, each 40px wide (no margins). - 3.🚀 Which tag loads script.js into a page? (a) <script src="script.js"> (b) <a href="script.js"> (c) <link script.js> (d) <js src="script.js">
- 4.Which of these is a strong password? (a) qwerty (b) iloveyou (c) 123456 (d) S0lar!Pen#8
- 5.Which colour pair is easy to read? (a) pink on red (b) dark grey on white (c) light grey on white (d) yellow on white
- 6.✍️ CSS declarations go inside which brackets? (a) { } (b) < > (c) [ ] (d) ( )
-
7.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p>
<p>Our school trip</p> -
8.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 220px;
justify-content: center;
}
Inside are 4 boxes, each 50px wide (no margins). - 9.🎯 Which element does the selector .note style? (a) <span class="big"> (b) <span id="note"> (c) <p class="red"> (d) <span class="note">
-
10.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Space Facts (b) index.html (c) Easy snacks (d) Thanks for visiting. - 11.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 12.🚀 Which file is best for the colours and fonts? (a) style.css (b) photo.jpg (c) script.js (d) index.html
-
13.✍️ What value is given to color in this rule?
.box {
color: red;
border: 2px solid;
background-color: yellow;
} (a) color (b) red (c) 20px (d) center - 14.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 15.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h2>? (a) <h2> (b) <h4> (c) <h5> (d) <h1>
- 16.🎯 Which sign starts a class selector? (a) & (b) . (c) # (d) @
- 17.🚀 You change your code. What should you do to see the change? (a) save and refresh (b) switch off the PC (c) delete the file (d) rename the folder
-
18.🖌️ How big is the text, in px?
p {
text-align: center;
font-size: 20px;
background-color: orange;
color: red;
} - 19.🎯 What kind of selector is .card? (a) an element selector (b) a class selector (c) an id selector
- 20.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) width (d) alt
- 21.True or false: JavaScript puts a picture on a page. (a) False (b) True
-
22.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Roses are red<br>Stars shine</p> -
23.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Fun facts</p>
<p>Good morning!</p>
<p>My pets</p> - 24.🔍 Which is the odd one out? (a) saves our .html files (b) shows line numbers (c) colours code to help us (d) answers page requests
- 25.Which of these is a weak password? (a) S0lar!Pen#8 (b) Kite_Fl1es@Dawn (c) 111111 (d) Chai$Cup_19x
- 26.🌐 Which one turns HTML into a page? (a) a web server (b) a web browser (c) a code editor
- 27.Which of these is the content? (a) the text or picture (b) the gap round content (c) space outside the border (d) the gap to other boxes
-
28.⚡ What does this code show?
let name = "Aman";
alert("Hi, " + name + "!"); (a) Hi, Aman! (b) Aman (c) name (d) Hi, name! - 29.💬 How does an HTML comment end? (a) >> (b) --> (c) */ (d) //
- 30.🖌️ Which CSS property makes letters bigger? (a) font-weight (b) color (c) font-family (d) font-size
- 31.🌗 Is black on white easy or hard to read? (a) hard to read (b) easy to read
- 32.🖌️ Which CSS property makes the text bold? (a) font-family (b) font-weight (c) text-align (d) background-color
- 33.🚀 Which file should this code go in: alert(score); (a) index.html (b) style.css (c) script.js
- 34.🌗 Is light grey on white easy or hard to read? (a) easy to read (b) hard to read
-
35.🔍 One closing tag is missing. Which one?
<i>I love mangoes.
<strong>My pets</strong>
<h2>Good morning!</h2> (a) </i> (b) </strong> (c) </h2> (d) </p> -
36.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="checkbox" name="colour"> Green
<input type="checkbox" name="colour"> Red
<input type="checkbox" name="colour"> Pink
<input type="checkbox" name="colour"> Blue
</form> - 37.🧭 Is <section> semantic or not semantic? (a) not semantic (b) semantic
- 38.🧩 Which language sets colours and fonts? (a) JavaScript (b) HTML (c) CSS
- 39.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a closing tag (d) a comment
-
40.📝 How many <input> tags are in this form?
<form>
<input type="password">
<input type="email">
<input type="number">
<input type="checkbox">
<input type="submit" value="Send">
</form>
Answer key
- write the HTML
- 40
- <script src="script.js">
- S0lar!Pen#8
- dark grey on white
- { }
- 2
- 10
- <span class="note">
- Space Facts
- Yes
- style.css
- red
- Yes
- <h5>
- .
- save and refresh
- 20
- a class selector
- alt
- False
- 3
- 1
- answers page requests
- 111111
- a web browser
- the text or picture
- Hi, Aman!
- -->
- font-size
- easy to read
- font-weight
- script.js
- hard to read
- </i>
- 4
- semantic
- CSS
- an attribute
- 5
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids