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 many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
- 2.🎯 How many elements on a page should have the same id? (a) any number (b) 2 (c) 5 (d) 1
-
3.⚖️ What colour is the text of this element?
<p class="star" id="top">Hi</p>
CSS:
p { color: purple; }
#top { color: red; } (a) black (b) red (c) white (d) purple -
4.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 140px;
justify-content: space-between;
}
Inside are 3 boxes, each 40px wide (no margins). -
5.✍️ Which property is set to 20px in this rule?
li {
font-size: 20px;
text-align: center;
width: 300px;
} (a) text-align (b) background-color (c) font-size (d) 20px - 6.True or false: to tell a trusted adult is safe. (a) True (b) False
-
7.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>Fun facts</h2>
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<p>Rain today</p> -
8.🔁 What is the LAST number this code prints?
for (let i = 0; i < 8; i = i + 3) {
console.log(i);
} - 9.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <hr> (d) <ul>
- 10.🎯 What kind of selector is #hero? (a) an id selector (b) a class selector (c) an element selector
- 11.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the later one (c) the first one (d) the shorter one
- 12.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <html> (d) <!DOCTYPE html>
-
13.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (min-width: 768px) {
p {
font-size: 22px;
}
} -
14.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Hello, world!</p>
<!-- <p>My pets</p> -->
<!-- <p>Fun facts</p> --> -
15.🖌️ What colour are the letters?
li {
color: green;
font-size: 16px;
text-align: right;
background-color: orange;
} (a) green (b) orange (c) purple - 16.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) [ (d) (
-
17.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="150"> - 18.🎨 A CSS file usually ends with which extension? (a) .png (b) .css (c) .js (d) .html
- 19.Which of these has a closing tag? (a) <h1> (b) <br> (c) <img> (d) <hr>
- 20.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) red (d) blue
- 21.🧭 Why use <nav> instead of <div> for a menu? (a) it makes text red (b) it adds pictures (c) it tells its meaning (d) it loads faster
- 22.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <h1> (d) <p>
- 23.True or false: “use big enough text” helps everyone use the page. (a) True (b) False
- 24.🌗 Is pink on red easy or hard to read? (a) hard to read (b) easy to read
- 25.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>
-
26.🔍 One closing tag is missing. Which one?
<p>I love mangoes.</p>
<small>The red kite
<em>Our school trip</em> (a) </small> (b) </em> (c) </p> (d) </h3> -
27.🔒 Is the connection to this address scrambled (encrypted)?
http://www.example.net/maths/tables.html (a) Yes (b) No - 28.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
-
29.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<p>Good morning!</p> -
30.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="100"> (a) Map of India (b) dog.jpg (c) map.png (d) cake.jpg -
31.⚖️ What colour is the text of this element?
<h2 class="menu" id="intro">Hi</h2>
CSS:
#intro { color: red; }
.menu { color: green; }
h2 { color: black; } (a) purple (b) black (c) green (d) red - 32.🌐 Which one stores a website’s files? (a) a web server (b) a code editor (c) a web browser
- 33.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 34.🧩 Which language changes the text size? (a) CSS (b) HTML (c) JavaScript
-
35.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Good morning!</p>
<!-- <p>My best friend</p> -->
<p>Hello, world!</p> (a) My pets (b) Hello, world! (c) My best friend (d) Good morning! - 36.✍️ In color: blue; which part is the value? (a) blue (b) : (c) color (d) ;
- 37.Which of these is true of a web browser? (a) turns HTML into a page (b) is where we type code (c) answers page requests (d) sends pages over the net
-
38.🔗 Where does this link open?
<a href="https://example.com">Maths fun</a> (a) in a new tab (b) in the same tab - 39.🚀 Which file should this code go in: #top { color: blue; } (a) style.css (b) index.html (c) script.js
- 40.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h5>? (a) <h2> (b) <h5> (c) <h3> (d) <h1>
Answer key
- 3
- 1
- red
- 10
- font-size
- True
- 4
- 6
- <ul>
- an id selector
- the later one
- <!DOCTYPE html>
- 16
- 2
- green
- <
- 150
- .css
- <h1>
- red
- it tells its meaning
- <h1>
- True
- hard to read
- <ol>
- </small>
- No
- <ol>
- 3
- map.png
- red
- a web server
- No
- CSS
- My best friend
- blue
- turns HTML into a page
- in the same tab
- style.css
- <h5>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids