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.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) black (c) white (d) blue
- 2.What does justify-content: space-between do? (a) packs boxes at the end (b) puts boxes in the middle (c) packs boxes at the start (d) equal gaps, none at ends
- 3.⚖️ 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
- 4.Which of these is true of <aside>? (a) is the page’s key part (b) helps you move around (c) holds extra side notes (d) sits at the bottom
- 5.True or false: <caption> holds the whole table. (a) False (b) True
- 6.📋 Which list tag lists steps in order? (a) <ul> (b) <li> (c) <ol>
-
7.🎯 Which CSS selector matches this element?
<li class="note" id="top">Hello</li> (a) div (b) .note (c) .top (d) #note - 8.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to make it bigger (c) to describe the image (d) to colour it
- 9.⚡ Which JavaScript word makes a new variable? (a) for (b) alert() (c) if (d) let
- 10.True or false: “use big enough text” helps everyone use the page. (a) False (b) True
- 11.What does justify-content: flex-start do? (a) equal gaps, none at ends (b) packs boxes at the end (c) puts boxes in the middle (d) packs boxes at the start
- 12.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) <h1/> (c) <h1> (d) </h1>
-
13.⚡ What does this code show?
let name = "Kabir";
console.log("Hi, " + name + "!"); (a) Hi, Kabir! (b) Hi, name! (c) name (d) Kabir -
14.🔁 How many times does this code print “Hi”?
for (let i = 2; i < 6; i++) {
console.log("Hi");
} -
15.🖌️ What colour are the letters?
li {
font-size: 20px;
background-color: yellow;
text-align: center;
color: purple;
} (a) purple (b) yellow (c) white -
16.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>My best friend</p>
<!-- <p>Rain today</p> --> (a) My best friend (b) The red kite (c) Rain today - 17.🔢 When you open a web page, which comes LAST? (a) DNS finds the server (b) the browser shows it (c) you type the URL (d) the server sends files
- 18.Which of these is padding? (a) the line round the box (b) the gap to other boxes (c) space inside the border (d) a solid or dotted edge
-
19.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 170px;
padding: 20px;
border: 2px solid black;
margin: 5px;
} - 20.📝 What does a password box show instead of letters? (a) numbers (b) dots (c) emojis (d) capital letters
- 21.🔢 To build and share your first web page, which comes first: “add CSS styles” or “write the HTML”? (a) add CSS styles (b) write the HTML
- 22.✍️ How does a CSS comment start? (a) // (b) # (c) /* (d) <!--
- 23.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
-
24.🔁 What is the LAST number this code prints?
for (let i = 0; i < 16; i = i + 2) {
console.log(i);
} - 25.🔐 Is Rain#Drop_42! a strong or a weak password? (a) strong (b) weak
-
26.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 70px;
padding: 20px;
border: 3px solid black;
margin: 10px;
} - 27.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
-
28.✍️ What is the selector in this CSS rule?
li {
font-weight: bold;
color: red;
padding: 8px;
font-size: 20px;
} (a) font-weight (b) body (c) red (d) li - 29.True or false: <main> holds a news story. (a) True (b) False
-
30.🖌️ What colour are the letters?
h2 {
background-color: yellow;
text-align: right;
color: black;
font-size: 12px;
} (a) yellow (b) black (c) white - 31.True or false: a code editor shows line numbers. (a) True (b) False
-
32.⚖️ What colour is the text of this element?
<p class="star" id="hero">Hi</p>
CSS:
#hero { color: purple; }
p { color: red; } (a) purple (b) green (c) yellow (d) red - 33.📄 Can HTML on its own pick a random number? (a) Yes (b) No
-
34.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Kites fly high</p> - 35.True or false: <title> has a closing tag. (a) False (b) True
- 36.True or false: “tiny grey text” helps everyone use the page. (a) False (b) True
- 37.🎯 Which sign starts an id selector? (a) # (b) @ (c) & (d) .
- 38.Which of these is a closing tag? (a) </b> (b) <p> (c) <title> (d) <body>
- 39.🔢 To build and share your first web page, what comes right after “test in a browser”? (a) write the HTML (b) add CSS styles (c) publish it online (d) plan what to show
-
40.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Fun facts</p>
<p>Cricket is fun.</p>
<h3>Fun facts</h3>
<h4>My best friend</h4>
Answer key
- red
- equal gaps, none at ends
- the later one
- holds extra side notes
- False
- <ol>
- .note
- to describe the image
- let
- True
- packs boxes at the start
- </h1>
- Hi, Kabir!
- 4
- purple
- Rain today
- the browser shows it
- space inside the border
- 224
- dots
- write the HTML
- /*
- <ul>
- 14
- strong
- 136
- <img>
- li
- False
- black
- True
- purple
- No
- 2
- True
- False
- #
- </b>
- publish it online
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids