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.🔍 One closing tag is missing. Which one?
<h2>Hello, world!</h2>
<b>My pets</b>
<h1>Our school trip (a) </b> (b) </h2> (c) </h1> (d) </small> - 2.True or false: console.log(5 + 2); goes in index.html. (a) True (b) False
- 3.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the head (d) the body
- 4.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 5.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
- 6.🎯 Which element does the selector div style? (a) <span> (b) <h1 id="logo"> (c) <p class="note"> (d) <div class="note">
- 7.True or false: HTML on its own cannot make headings. (a) True (b) False
- 8.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) black (c) red (d) yellow
-
9.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 280px;
padding: 15px;
border: 2px solid black;
margin: 0px;
} -
10.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="200"> -
11.🖌️ How big is the text, in px?
li {
background-color: yellow;
text-align: left;
font-size: 40px;
color: blue;
} - 12.True or false: the browser asks for a web page. (a) True (b) False
- 13.🔢 When you open a web page, which comes FIRST? (a) you type the URL (b) the browser asks it (c) the server sends files (d) DNS finds the server
- 14.🔁 Which word runs code only when something is true? (a) log (b) for (c) if (d) let
- 15.True or false: <td> holds the whole table. (a) True (b) False
-
16.🔗 Which words do you click on?
<a href="maths.html">Take the quiz</a> (a) maths.html (b) Take the quiz (c) href (d) Play games - 17.Which of these has a closing tag? (a) <meta> (b) <input> (c) <br> (d) <title>
- 18.True or false: <img> goes in the head. (a) True (b) False
-
19.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Stars shine<br>Rivers flow<br>Roses are red<br>Sky is blue</p> -
20.⚖️ What colour is the text of this element?
<h1 class="red" id="hero">Hi</h1>
CSS:
#hero { color: yellow; }
#hero { color: blue; } (a) purple (b) blue (c) black (d) yellow -
21.⚖️ What colour is the text of this element?
<h2 class="note" id="top">Hi</h2>
CSS:
#top { color: green; }
.note { color: orange; }
h2 { color: blue; } (a) blue (b) green (c) orange (d) black -
22.📊 How many cells are in each row?
<table>
<tr><td>Mango</td><td>Banana</td></tr>
<tr><td>Guava</td><td>Guava</td></tr>
<tr><td>Jamun</td><td>Litchi</td></tr>
</table> - 23.Which of these is not safe to do online? (a) meet an online stranger (b) use a strong password (c) check for https first (d) tell a trusted adult
-
24.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="radio" name="fruit"> Guava
<input type="radio" name="fruit"> Papaya
<input type="radio" name="fruit"> Mango
</form> - 25.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <img> (d) <link>
- 26.Which of these is true of a web browser? (a) colours code to help us (b) answers page requests (c) has an address bar (d) is where we type code
- 27.🌍 What do we call the computer that stores a website? (a) a mouse (b) a printer (c) a server (d) a keyboard
-
28.🔁 How many numbers does this code print?
for (let i = 0; i < 16; i = i + 3) {
console.log(i);
} -
29.⚖️ What colour is the text of this element?
<p class="menu" id="top">Hi</p>
CSS:
.menu { color: blue; }
p { color: white; } (a) orange (b) white (c) yellow (d) blue -
30.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 180px;
justify-content: flex-start;
}
Inside are 2 boxes, each 50px wide (no margins). - 31.True or false: <th> makes a heading cell. (a) False (b) True
- 32.📦 In the box model, which part is space outside the border? (a) margin (b) padding (c) content (d) border
-
33.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>The red kite</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>Good morning!</p> -->
<!-- <p>My pets</p> --> -
34.🔁 What does this code print?
let score = 14;
if (score > 13) {
console.log("You win");
} else {
console.log("Play again");
} (a) Play again (b) You win - 35.🔍 Which is the odd one out? (a) answers page requests (b) shows pages from the web (c) hosts websites online (d) stores a website’s files
- 36.📱 Responsive design means a page ___. (a) has no pictures (b) never changes (c) is only for laptops (d) fits every screen
-
37.🔍 Which line is missing its closing tag?
line 1: <b>Our school trip</b>
line 2: <h3>Cricket is fun.
line 3: <em>I love mangoes.</em> (a) line 2 (b) line 1 (c) line 3 - 38.True or false: in <img>, width describes the picture. (a) False (b) True
-
39.🖌️ What colour is behind the letters?
h2 {
color: black;
text-align: right;
background-color: purple;
font-size: 32px;
} (a) black (b) purple (c) blue - 40.♿ A part of the page is under a <h5> heading. Which tag should its sub-heading use? (a) <h5> (b) <h2> (c) <h1> (d) <h6>
Answer key
- </h1>
- False
- the body
- a closing tag
- False
- <div class="note">
- False
- yellow
- 314
- 200
- 40
- True
- you type the URL
- if
- False
- Take the quiz
- <title>
- False
- 5
- blue
- green
- 2
- meet an online stranger
- 1
- <a>
- has an address bar
- a server
- 6
- blue
- 80
- True
- margin
- 1
- You win
- shows pages from the web
- fits every screen
- line 2
- False
- purple
- <h6>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids