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.True or false: HTML on its own cannot make tables. (a) False (b) True
- 2.🚀 Which file should this code go in: <a href="a.html">Go</a> (a) index.html (b) script.js (c) style.css
- 3.True or false: <nav> holds the menu of links. (a) True (b) False
- 4.🧭 Which semantic tag holds the menu of links? (a) <aside> (b) <nav> (c) <header> (d) <main>
-
5.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<!-- <p>I love mangoes.</p> -->
<p>My pets</p>
<p>Rain today</p> (a) I love mangoes. (b) Fun facts (c) Rain today (d) My pets -
6.✍️ What is the selector in this CSS rule?
li {
font-weight: bold;
color: red;
border: 2px solid;
} (a) red (b) font-weight (c) body (d) li - 7.💪 Which justify-content value equal gaps, none at ends? (a) space-between (b) flex-end (c) center (d) flex-start
- 8.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h6> or <h5>? (a) <h4> (b) <h5> (c) <h6> (d) <h2>
- 9.True or false: let score = 0; goes in style.css. (a) True (b) False
- 10.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 11.🔍 Which is the odd one out? (a) saves our .html files (b) opens web pages for us (c) colours code to help us (d) is where we type code
-
12.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 240px;
justify-content: flex-end;
}
Inside are 3 boxes, each 60px wide (no margins). - 13.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a dollar $ (d) a slash /
-
14.🔁 What does this code print?
let score = 37;
if (score > 10) {
console.log("You win");
} else {
console.log("Play again");
} (a) You win (b) Play again -
15.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 110px;
padding: 10px;
border: 2px solid black;
margin: 0px;
} - 16.What does color do? (a) centres a heading (b) colours behind the text (c) sets the letter colour (d) makes letters bigger
-
17.✍️ How many declarations (property: value pairs) are in this rule?
p {
border: 2px solid;
font-size: 20px;
} -
18.🔗 Which address opens when you click this link?
<a href="about.html">Contact us</a> (a) https://example.com (b) contact.html (c) about.html (d) Contact us - 19.⚡ Which JavaScript word repeats code? (a) for (b) console.log() (c) let (d) alert()
-
20.⚡ What number does this code print?
let marks = 5;
marks = marks + 2;
marks = marks - 7;
console.log(marks); - 21.Which of these is true of a web server? (a) colours code to help us (b) sends pages over the net (c) is where we type code (d) shows pages from the web
- 22.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) the later one (c) the first one (d) neither
-
23.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 110px;
padding: 15px;
border: 4px solid black;
margin: 0px;
} - 24.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 25.🌗 Is dark grey on white easy or hard to read? (a) hard to read (b) easy to read
- 26.🛡️ Online: is it safe to use a strong password? (a) not safe (b) safe
- 27.🔐 Is Mango#Kite29! a strong or a weak password? (a) strong (b) weak
-
28.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p>
<p>The red kite</p>
<p>Rain today</p> -
29.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="checkbox" name="sport"> Cricket
<input type="checkbox" name="sport"> Kabaddi
<input type="checkbox" name="sport"> Chess
<input type="checkbox" name="sport"> Hockey
<input type="checkbox" name="sport"> Football
</form> - 30.True or false: in <img>, alt is read by screen readers. (a) True (b) False
- 31.🧭 Why use <nav> instead of <div> for a menu? (a) it makes text red (b) it tells its meaning (c) it adds pictures (d) it loads faster
-
32.📋 What number does the browser show next to “Grapes”?
<ol start="4">
<li>Orange</li>
<li>Grapes</li>
<li>Banana</li>
</ol> -
33.🎯 Which CSS selector matches this element?
<h1 class="big" id="logo">Hello</h1> (a) .big (b) #end (c) #big (d) .logo - 34.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h1> or <h4>? (a) <h5> (b) <h4> (c) <h3> (d) <h1>
- 35.True or false: “label every form box” helps everyone use the page. (a) False (b) True
- 36.🛡️ Is it safe to use the same password on every site? (a) Yes (b) No
- 37.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 38.🏷️ HTML marks up text using ___. (a) pixels (b) wires (c) keys (d) tags
- 39.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) height (c) alt (d) src
- 40.Which of these is true of a web server? (a) saves our .html files (b) shows pages from the web (c) has an address bar (d) hosts websites online
Answer key
- False
- index.html
- True
- <nav>
- I love mangoes.
- li
- space-between
- <h2>
- False
- an opening tag
- opens web pages for us
- 60
- a slash /
- You win
- 134
- sets the letter colour
- 2
- about.html
- for
- 0
- sends pages over the net
- the later one
- 148
- Yes
- easy to read
- safe
- strong
- 3
- 5
- True
- it tells its meaning
- 5
- .big
- <h5>
- True
- No
- has a closing tag
- tags
- height
- hosts websites online
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids