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: <meta charset="utf-8"> goes in the body. (a) False (b) True
-
2.✍️ Which property is set to italic in this rule?
h1 {
font-style: italic;
color: red;
width: 300px;
} (a) color (b) italic (c) font-style (d) font-size - 3.Which of these is an opening tag? (a) </body> (b) <b> (c) </b> (d) </p>
-
4.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> --> (a) My pets (b) Good morning! (c) I love mangoes. - 5.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <p> (d) <h1>
-
6.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p> - 7.True or false: to check for https first is safe. (a) True (b) False
- 8.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
- 9.Which of these does HTML do? (a) lays out the page (b) sets colours and fonts (c) shows a pop-up message (d) gives the page structure
-
10.📋 What number does the browser show next to “Banana”?
<ol start="5">
<li>Guava</li>
<li>Orange</li>
<li>Banana</li>
</ol> -
11.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Jamun</li>
<li>Orange</li>
<li>Litchi</li>
<li>Banana</li>
</ul> - 12.True or false: <li> goes inside ul or ol. (a) False (b) True
- 13.📝 Which tag holds a whole form? (a) <ol> (b) <table> (c) <input> (d) <form>
-
14.⚡ What does this code print? (Look at the quotes!)
let x = "9";
let y = 2;
console.log(x + y); (a) 92 (b) Error (c) 11 -
15.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="350"> (a) The full moon (b) fort.jpg (c) bus.jpg (d) moon.png -
16.🖌️ How big is the text, in px?
h2 {
color: red;
font-size: 40px;
text-align: left;
background-color: black;
} -
17.🔍 Which line is missing its closing tag?
line 1: <small>The red kite</small>
line 2: <b>My best friend</b>
line 3: <strong>Fun facts (a) line 1 (b) line 2 (c) line 3 - 18.♿ Who uses a screen reader? (a) people who are blind (b) only robots (c) only teachers (d) only coders
- 19.Which of these is an opening tag? (a) </title> (b) <p> (c) </p> (d) </li>
- 20.🔁 Which word runs code only when something is true? (a) log (b) for (c) if (d) let
-
21.🔁 How many times does this code print “Well done”?
for (let i = 3; i <= 12; i++) {
console.log("Well done");
} -
22.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 160px;
justify-content: flex-end;
}
Inside are 2 boxes, each 50px wide (no margins). -
23.⚖️ What colour is the text of this element?
<h2 class="star" id="hero">Hi</h2>
CSS:
.star { color: blue; }
h2 { color: orange; }
#hero { color: red; } (a) black (b) blue (c) orange (d) red - 24.Which of these does HTML do? (a) checks a quiz answer (b) lays out the page (c) makes a link (d) counts down a timer
-
25.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Kites fly high<br>Stars shine<br>Birds sing<br>Rivers flow</p> - 26.🔁 When does the else part run? (a) when if is false (b) never (c) when if is true (d) always
-
27.📱 The screen is 540px wide. Does the rule inside @media apply?
p {
font-size: 16px;
}
@media (max-width: 768px) {
p {
font-size: 14px;
}
} (a) No (b) Yes - 28.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <ul> (d) <li>
- 29.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) white (c) black (d) bright green
- 30.🎯 What kind of selector is #top? (a) an element selector (b) a class selector (c) an id selector
- 31.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) black (c) bright green (d) red
-
32.🔍 Which line is missing its closing tag?
line 1: <em>Our school trip</em>
line 2: <u>I love mangoes.
line 3: <small>My pets</small> (a) line 1 (b) line 2 (c) line 3 -
33.⚡ What does this code show?
let name = "Zoya";
alert("Welcome, " + name + "!"); (a) Welcome, Zoya! (b) name (c) Zoya (d) Welcome, name! - 34.📱 max-width: 600px applies when the screen is ___. (a) exactly 1000px (b) turned off (c) 600px or narrower (d) 600px or wider
-
35.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>Our school trip</p>
<p>Our school trip</p>
<h2>My pets</h2>
<h2>Cricket is fun.</h2>
<p>My pets</p> - 36.📄 Which part holds everything you see on the page? (a) the doctype (b) the body (c) the head (d) the title
-
37.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Good morning!</p>
<p>Fun facts</p> (a) Good morning! (b) Hello, world! (c) Fun facts - 38.💪 Which justify-content value packs boxes at the start? (a) flex-end (b) center (c) flex-start (d) space-between
- 39.True or false: the browser shows the page to you. (a) False (b) True
- 40.🧭 Which semantic tag holds the logo and title? (a) <nav> (b) <header> (c) <article> (d) <aside>
Answer key
- False
- font-style
- <b>
- Good morning!
- <h6>
- 1
- True
- blue
- gives the page structure
- 7
- 5
- True
- <form>
- 92
- moon.png
- 40
- line 3
- people who are blind
- <p>
- if
- 10
- 60
- red
- makes a link
- 5
- when if is false
- Yes
- <li>
- bright green
- an id selector
- black
- line 2
- Welcome, Zoya!
- 600px or narrower
- 4
- the body
- Hello, world!
- flex-start
- True
- <header>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids