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 href="x.html">, what is href? (a) a comment (b) an element name (c) a closing tag (d) an attribute
- 2.True or false: body { margin: 0; } goes in style.css. (a) False (b) True
- 3.🛡️ Online: is it safe to use a nickname in games? (a) safe (b) not safe
- 4.True or false: #main is an id selector. (a) False (b) True
-
5.⚖️ What colour is the text of this element?
<h2 class="big" id="intro">Hi</h2>
CSS:
.big { color: blue; }
.big { color: red; } (a) green (b) purple (c) blue (d) red - 6.🔢 To build and share your first web page, which comes FIRST? (a) plan what to show (b) add CSS styles (c) test in a browser (d) write the HTML
- 7.🌗 Is dark grey on white easy or hard to read? (a) easy to read (b) hard to read
- 8.🎨 One CSS file can style how many pages? (a) only one image (b) only one word (c) many pages (d) no pages
-
9.🌍 What is the path in this URL?
https://www.example.net/games/chess.html (a) https (b) www.example.net (c) /games/chess.html (d) /about.html - 10.🖌️ Which CSS property makes letters bigger? (a) color (b) font-weight (c) font-size (d) background-color
- 11.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h6> or <h3>? (a) <h3> (b) <h1> (c) <h6> (d) <h5>
-
12.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 260px;
justify-content: space-between;
}
Inside are 4 boxes, each 50px wide (no margins). - 13.✍️ Which sign goes between a property and its value? (a) : (b) - (c) = (d) ;
- 14.True or false: <h1>My Site</h1> goes in script.js. (a) False (b) True
- 15.🚀 Which file is best for code that reacts to clicks? (a) style.css (b) index.html (c) notes.txt (d) script.js
-
16.🔁 What does this code print?
let temp = 34;
if (temp > 24) {
console.log("Hot");
} else {
console.log("Cool");
} (a) Cool (b) Hot - 17.🔐 Is S0lar!Pen#8 a strong or a weak password? (a) weak (b) strong
-
18.⚖️ What colour is the text of this element?
<p class="note" id="top">Hi</p>
CSS:
.note { color: blue; }
p { color: green; }
#top { color: red; } (a) blue (b) orange (c) red (d) green - 19.Which of these is an opening tag? (a) </title> (b) </li> (c) <p> (d) </b>
- 20.💪 Which justify-content value puts boxes in the middle? (a) flex-start (b) space-between (c) flex-end (d) center
-
21.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Grapes</li>
<li>Litchi</li>
</ol> - 22.🌗 Is white on black easy or hard to read? (a) easy to read (b) hard to read
- 23.📱 Which tag helps phones show a page at the right size? (a) the br tag (b) the title tag (c) the viewport meta tag (d) the hr tag
- 24.Which of these is safe to do online? (a) meet an online stranger (b) share your password (c) log out on shared PCs (d) post your home address
- 25.Which of these does JavaScript do? (a) changes the text size (b) puts a picture on a page (c) gives the page structure (d) shows a pop-up message
- 26.True or false: <ul> goes in the body. (a) False (b) True
- 27.🔢 When you open a web page, which comes FIRST? (a) the browser shows it (b) you type the URL (c) the server sends files (d) DNS finds the server
- 28.🔍 Which is the odd one out? (a) rounds box corners (b) adds space around boxes (c) sets colours and fonts (d) changes the page live
- 29.🛡️ Should you share your password with your best friend? (a) No (b) Yes
- 30.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
- 31.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) editor (c) element (d) attribute
-
32.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 280px;
justify-content: space-between;
}
Inside are 3 boxes, each 60px wide (no margins). - 33.Which of these is an opening tag? (a) </li> (b) <b> (c) </p> (d) </b>
- 34.💪 Which flexbox property spaces boxes along a row? (a) gap (b) justify-content (c) display: flex (d) flex-direction
- 35.🚀 Which file should this code go in: <img src="cat.png"> (a) script.js (b) style.css (c) index.html
- 36.True or false: <ul><li>Art</li></ul> goes in script.js. (a) False (b) True
- 37.🎯 Which element does the selector .red style? (a) <span id="red"> (b) <span class="box"> (c) <span class="red"> (d) <p class="star">
- 38.True or false: a code editor is where we type code. (a) False (b) True
- 39.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) alt (d) width
-
40.🔍 One closing tag is missing. Which one?
<em>Good morning!</em>
<h2>I love mangoes.
<small>My pets</small> (a) </small> (b) </h2> (c) </p> (d) </em>
Answer key
- an attribute
- True
- safe
- True
- red
- plan what to show
- easy to read
- many pages
- /games/chess.html
- font-size
- <h6>
- 20
- :
- False
- script.js
- Hot
- strong
- red
- <p>
- center
- 3
- easy to read
- the viewport meta tag
- log out on shared PCs
- shows a pop-up message
- True
- you type the URL
- changes the page live
- No
- False
- element
- 50
- <b>
- justify-content
- index.html
- False
- <span class="red">
- True
- width
- </h2>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids