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 much empty space (px) is left after the last box?
.row {
display: flex;
width: 190px;
justify-content: flex-start;
}
Inside are 3 boxes, each 40px wide (no margins). - 2.Which of these is true of a web server? (a) has an address bar (b) shows pages from the web (c) saves our .html files (d) stores a website’s files
- 3.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <h2> (c) <h2/> (d) <\h2>
- 4.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
- 5.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
- 6.Which of these is true of a code editor? (a) answers page requests (b) sends pages over the net (c) hosts websites online (d) shows line numbers
-
7.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Banana</li>
<li>Jamun</li>
<li>Mango</li>
<li>Orange</li>
<li>Guava</li>
</ol> -
8.🔁 How many numbers does this code print?
for (let i = 0; i < 15; i = i + 2) {
console.log(i);
} -
9.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Mango</li>
</ul> (a) numbers (b) bullets - 10.🖌️ Which CSS property centres a heading? (a) text-align (b) color (c) font-weight (d) font-family
- 11.💾 A web page file usually ends with which extension? (a) .txt (b) .mp3 (c) .html (d) .png
- 12.Which of these is a closing tag? (a) </li> (b) <h1> (c) <li> (d) <p>
- 13.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) <h1/> (c) </h1> (d) <h1>
-
14.🔁 What does this code print?
let age = 1;
if (age >= 21) {
console.log("teen");
} else {
console.log("child");
} (a) teen (b) child - 15.True or false: <table> goes in the head. (a) True (b) False
- 16.Which of these is an opening tag? (a) </title> (b) </b> (c) </li> (d) <title>
-
17.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Fun facts</p>
<p>Fun facts</p>
<p>My best friend</p> - 18.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
- 19.♿ A part of the page is under a <h1> heading. Which tag should its sub-heading use? (a) <h4> (b) <h6> (c) <h5> (d) <h2>
- 20.What is <input type="password"> for? (a) sends the form (b) is for one line of words (c) takes only numbers (d) hides what you type
- 21.🌈 Which hex code is blue? (a) #ffff00 (b) #ff0000 (c) #0000ff (d) #00ff00
-
22.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Stars shine<br>Birds sing</p> - 23.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a slash / (d) a hash #
- 24.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h6> or <h3>? (a) <h2> (b) <h6> (c) <h5> (d) <h3>
-
25.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 60px;
padding: 30px;
border: 5px solid black;
margin: 0px;
} -
26.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (min-width: 768px) {
p {
font-size: 22px;
}
} -
27.🔍 One closing tag is missing. Which one?
<h1>Hello, world!
<h2>The red kite</h2>
<small>Good morning!</small> (a) </h2> (b) </small> (c) </u> (d) </h1> - 28.🛡️ Online: is it safe to type a password on http? (a) not safe (b) safe
- 29.📦 In the box model, which part is the gap round content? (a) border (b) content (c) padding (d) margin
- 30.True or false: a web browser sends pages over the net. (a) False (b) True
- 31.🔁 What does i++ do? (a) takes 1 from i (b) adds 1 to i (c) doubles i (d) prints i
-
32.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 140px;
justify-content: flex-start;
}
Inside are 2 boxes, each 60px wide (no margins). -
33.🔁 What is the LAST number this code prints?
for (let i = 0; i < 18; i = i + 2) {
console.log(i);
} - 34.🔐 Is password a strong or a weak password? (a) weak (b) strong
- 35.True or false: <ul> is an ordered list. (a) True (b) False
- 36.💪 Which justify-content value packs boxes at the end? (a) flex-start (b) flex-end (c) center (d) space-between
-
37.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Good morning!</p>
<p>Rain today</p> (a) Cricket is fun. (b) Good morning! (c) Rain today -
38.🔍 One closing tag is missing. Which one?
<h3>Fun facts</h3>
<h2>The red kite</h2>
<em>Our school trip (a) </h1> (b) </h2> (c) </em> (d) </h3> -
39.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="radio" name="fruit"> Banana
<input type="radio" name="fruit"> Guava
<input type="radio" name="fruit"> Litchi
<input type="radio" name="fruit"> Mango
<input type="radio" name="fruit"> Papaya
</form> -
40.🔁 How many times does this code print “Hello”?
for (let i = 0; i < 3; i++) {
console.log("Hello");
}
Answer key
- 70
- stores a website’s files
- </h2>
- <a>
- <a href="about.html">
- shows line numbers
- 6
- 8
- bullets
- text-align
- .html
- </li>
- </h1>
- child
- False
- <title>
- 1
- blue
- <h2>
- hides what you type
- #0000ff
- 3
- a slash /
- <h2>
- 130
- 22
- </h1>
- not safe
- padding
- False
- adds 1 to i
- 20
- 16
- weak
- False
- flex-end
- Cricket is fun.
- </em>
- 1
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids