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.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (max-width: 600px) {
p {
font-size: 18px;
}
} - 2.True or false: <ol> is an ordered list. (a) True (b) False
-
3.📋 What number does the browser show next to “Papaya”?
<ol start="4">
<li>Banana</li>
<li>Orange</li>
<li>Papaya</li>
<li>Jamun</li>
</ol> -
4.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 270px;
padding: 10px;
border: 4px solid black;
margin: 0px;
} - 5.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <ul> (d) <li>
- 6.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
-
7.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 6; i++) {
total = total + 9;
}
console.log(total); -
8.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (max-width: 600px) {
p {
font-size: 10px;
}
} -
9.⚖️ What colour is the text of this element?
<p class="menu" id="main">Hi</p>
CSS:
#main { color: red; }
#main { color: purple; } (a) white (b) purple (c) black (d) red - 10.Which of these is a weak password? (a) Rain#Drop_42! (b) abcd1234 (c) Mango#Kite29! (d) Chai$Cup_19x
-
11.⚖️ What colour is the text of this element?
<p class="red" id="hero">Hi</p>
CSS:
p { color: orange; }
#hero { color: green; }
.red { color: blue; } (a) orange (b) red (c) green (d) blue - 12.💪 Which flexbox property sets space between boxes? (a) gap (b) display: flex (c) flex-direction (d) align-items
- 13.📝 Which input type is for an email address? (a) email (b) text (c) date (d) submit
-
14.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 240px;
padding: 30px;
border: 5px solid black;
margin: 0px;
} - 15.📝 Which tag makes a drop-down list? (a) <ol> (b) <select> (c) <li> (d) <ul>
- 16.♿ A part of the page is under a <h1> heading. Which tag should its sub-heading use? (a) <h5> (b) <h4> (c) <h6> (d) <h2>
- 17.✍️ How does a CSS comment start? (a) <!-- (b) // (c) /* (d) #
- 18.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an attribute (d) an element name
-
19.🔒 Is the connection to this address scrambled (encrypted)?
http://www.example.net/games/chess.html (a) Yes (b) No - 20.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
21.🖌️ How big is the text, in px?
h2 {
color: white;
background-color: red;
font-size: 16px;
text-align: right;
} - 22.🌍 What do we call the computer that stores a website? (a) a keyboard (b) a mouse (c) a server (d) a printer
- 23.🔢 In a basic web page file, which comes first: “<head>” or “<body>”? (a) <head> (b) <body>
- 24.True or false: <br> has a closing tag. (a) False (b) True
- 25.What is <input type="email"> for? (a) lets you tick many (b) lets you pick only one (c) is for one line of words (d) is for an email address
-
26.✍️ How many declarations (property: value pairs) are in this rule?
.box {
color: red;
width: 300px;
font-style: italic;
} - 27.🔍 Which is the odd one out? (a) puts a picture on a page (b) checks a quiz answer (c) makes a form box (d) gives the page structure
- 28.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) shows pages from the web (d) colours code to help us
- 29.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
-
30.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>Hello, world!</p>
<p>The red kite</p>
<p>Hello, world!</p>
<h2>My pets</h2> - 31.True or false: margin is space outside the border. (a) False (b) True
- 32.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h6> or <h3>? (a) <h1> (b) <h6> (c) <h3> (d) <h2>
-
33.🔗 Which words do you click on?
<a href="contact.html">Visit the site</a> (a) Maths fun (b) href (c) Visit the site (d) contact.html - 34.Which of these is an opening tag? (a) </h1> (b) <li> (c) </p> (d) </title>
- 35.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
36.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>Our school trip</h2>
<p>I love mangoes.</p> - 37.True or false: alert("Hi"); goes in index.html. (a) False (b) True
- 38.🔢 On a typical page, from top to bottom, which comes first: “<footer>” or “<nav>”? (a) <nav> (b) <footer>
- 39.📊 In a table, which tag is a row? (a) <tr> (b) <tb> (c) <th> (d) <td>
- 40.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
Answer key
- 18
- True
- 6
- 298
- <li>
- in the body
- 54
- 12
- purple
- abcd1234
- green
- gap
- 310
- <select>
- <h2>
- /*
- an attribute
- No
- an empty tag
- 16
- a server
- <head>
- False
- is for an email address
- 3
- checks a quiz answer
- colours code to help us
- False
- 4
- True
- <h1>
- Visit the site
- <li>
- a closing tag
- 2
- False
- <nav>
- <tr>
- an empty tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids