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.✍️ CSS declarations go inside which brackets? (a) ( ) (b) < > (c) { } (d) [ ]
- 2.Which of these is true of a code editor? (a) hosts websites online (b) stores a website’s files (c) saves our .html files (d) shows pages from the web
- 3.What does justify-content: center do? (a) packs boxes at the start (b) packs boxes at the end (c) equal gaps, none at ends (d) puts boxes in the middle
- 4.Which of these is an opening tag? (a) </body> (b) </b> (c) </title> (d) <li>
-
5.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>My best friend</p>
<p>The red kite</p> - 6.True or false: <caption> gives the table a title. (a) False (b) True
-
7.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Banana</li>
</ol> - 8.🧭 Which semantic tag holds one blog post? (a) <aside> (b) <header> (c) <main> (d) <article>
- 9.True or false: in <img>, alt sets how wide it is. (a) True (b) False
- 10.True or false: console.log(5 + 2); goes in script.js. (a) True (b) False
- 11.True or false: padding is the text or picture. (a) False (b) True
- 12.🌗 Is white on black easy or hard to read? (a) easy to read (b) hard to read
- 13.🎯 What kind of selector is img? (a) an element selector (b) an id selector (c) a class selector
- 14.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
-
15.⚡ What number does this code print?
let a = 38;
let b = 9;
console.log(a + b); - 16.🌈 Which colour of light is strongest in rgb(20, 75, 179)? (a) green (b) blue (c) red
-
17.🔍 One closing tag is missing. Which one?
<h3>I love mangoes.</h3>
<b>My best friend
<h2>Hello, world!</h2> (a) </b> (b) </h2> (c) </h3> (d) </p> - 18.🌍 What does a web address (URL) tell the browser? (a) where the page is (b) your password (c) the page colour (d) how old you are
-
19.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 140px;
justify-content: center;
}
Inside are 2 boxes, each 50px wide (no margins). - 20.📝 What does <hr> draw? (a) a line across the page (b) a table (c) a link (d) a picture
-
21.🔁 What does this code print?
let age = 37;
if (age > 19) {
console.log("teen");
} else {
console.log("child");
} (a) child (b) teen -
22.🎯 Which CSS selector matches this element?
<li class="big" id="hero">Hello</li> (a) .red (b) div (c) #hero (d) .hero -
23.🖌️ Where does the text sit on its line?
p {
text-align: right;
color: black;
background-color: green;
font-size: 36px;
} (a) on the left (b) in the middle (c) on the right -
24.📋 What number does the browser show next to “Banana”?
<ol start="9">
<li>Litchi</li>
<li>Banana</li>
<li>Mango</li>
</ol> - 25.💬 How does an HTML comment end? (a) */ (b) --> (c) // (d) >>
-
26.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>Fun facts</p>
<p>My pets</p>
<p>Good morning!</p> (a) My pets (b) Fun facts (c) Good morning! (d) Our school trip -
27.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Our school trip</p>
<h2>Good morning!</h2>
<p>The red kite</p>
<h2>I love mangoes.</h2> -
28.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="50"> (a) tiger.jpg (b) bus.jpg (c) Our school bus (d) fort.jpg - 29.True or false: <th> makes a heading cell. (a) False (b) True
- 30.🔍 Which is the odd one out? (a) adds space around boxes (b) changes the text size (c) reacts to a button click (d) sets colours and fonts
- 31.Which of these does HTML do? (a) changes the text size (b) reacts to a button click (c) gives the page structure (d) adds space around boxes
- 32.📄 Can HTML on its own run a game loop? (a) Yes (b) No
- 33.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 10 (d) 6
-
34.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
p {
font-size: 24px;
}
@media (min-width: 768px) {
p {
font-size: 26px;
}
} -
35.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="200"> (a) tiger.jpg (b) bus.jpg (c) fort.jpg (d) Our school bus - 36.🚀 Which file is best for code that reacts to clicks? (a) index.html (b) notes.txt (c) style.css (d) script.js
- 37.♿ Who uses a screen reader? (a) people who are blind (b) only teachers (c) only robots (d) only coders
- 38.Which of these is a strong password? (a) riya2014 (b) 111111 (c) Rain#Drop_42! (d) iloveyou
- 39.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
-
40.✍️ What value is given to width in this rule?
.note {
background-color: yellow;
border: 2px solid;
width: 300px;
} (a) width (b) italic (c) 300px (d) red
Answer key
- { }
- saves our .html files
- puts boxes in the middle
- <li>
- 1
- True
- 4
- <article>
- False
- True
- False
- easy to read
- an element selector
- <ul>
- 47
- blue
- </b>
- where the page is
- 20
- a line across the page
- teen
- #hero
- on the right
- 10
- -->
- Our school trip
- 3
- bus.jpg
- True
- reacts to a button click
- gives the page structure
- No
- 1
- 24
- bus.jpg
- script.js
- people who are blind
- Rain#Drop_42!
- red
- 300px
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids