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 attribute of <img> sets how tall it is? (a) alt (b) src (c) height (d) width
- 2.True or false: the border is space inside the border. (a) False (b) True
- 3.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 4.True or false: in <img>, width sets how wide it is. (a) False (b) True
-
5.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 240px;
justify-content: center;
}
Inside are 3 boxes, each 40px wide (no margins). - 6.🎯 Which element does the selector #intro style? (a) <h1 id="main"> (b) <h1 class="intro"> (c) <h1 id="intro"> (d) <h2 class="menu">
- 7.⚖️ Which selector is the strongest? (a) a class selector (b) an element selector (c) an id selector
- 8.🌈 Which colour is #ffffff? (a) magenta (b) bright green (c) white (d) cyan
- 9.Which of these does CSS do? (a) makes a link (b) gives the page structure (c) puts a picture on a page (d) rounds box corners
- 10.🎨 What does CSS stand for? (a) Creative Sheet System (b) Colourful Site Styles (c) Computer Style Sheets (d) Cascading Style Sheets
- 11.📱 Responsive design means a page ___. (a) has no pictures (b) is only for laptops (c) never changes (d) fits every screen
- 12.⚡ What does JavaScript add to a web page? (a) the domain name (b) the page title (c) only colours (d) actions and changes
- 13.✍️ Which sign goes between a property and its value? (a) - (b) : (c) ; (d) =
- 14.🔁 Which word runs code only when something is true? (a) let (b) if (c) log (d) for
-
15.📱 The screen is 375px wide. Does the rule inside @media apply?
p {
font-size: 24px;
}
@media (max-width: 1024px) {
p {
font-size: 18px;
}
} (a) Yes (b) No - 16.🚀 Which file should this code go in: <h1>My Site</h1> (a) index.html (b) script.js (c) style.css
-
17.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> (a) width (b) A red kite (c) A tiger asleep (d) tiger.jpg -
18.🔍 One closing tag is missing. Which one?
<p>I love mangoes.
<h3>Hello, world!</h3>
<u>Fun facts</u> (a) </p> (b) </u> (c) </h3> (d) </i> -
19.⚖️ What colour is the text of this element?
<h2 class="red" id="hero">Hi</h2>
CSS:
h2 { color: white; }
h2 { color: black; } (a) white (b) green (c) orange (d) black - 20.🔢 When you open a web page, which comes FIRST? (a) DNS finds the server (b) the browser shows it (c) the browser asks it (d) you type the URL
- 21.✍️ Which sign ends each CSS declaration? (a) : (b) , (c) . (d) ;
- 22.📄 Can HTML on its own run a game loop? (a) Yes (b) No
-
23.⚖️ What colour is the text of this element?
<p class="box" id="logo">Hi</p>
CSS:
#logo { color: black; }
#logo { color: red; } (a) yellow (b) red (c) black (d) white -
24.📋 What number does the browser show next to “Papaya”?
<ol start="8">
<li>Orange</li>
<li>Banana</li>
<li>Papaya</li>
<li>Guava</li>
<li>Jamun</li>
<li>Grapes</li>
</ol> - 25.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) makes a list (d) starts a new line
- 26.🎯 Which element does the selector li style? (a) <div> (b) <p id="main"> (c) <li class="menu"> (d) <span class="menu">
- 27.True or false: <input type="email"> is for an email address. (a) True (b) False
-
28.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Good morning!</p>
<p>Our school trip</p>
<!-- <p>Fun facts</p> --> -
29.🔁 How many numbers does this code print?
for (let i = 0; i < 15; i = i + 2) {
console.log(i);
} - 30.True or false: <img src="cat.png"> goes in index.html. (a) False (b) True
- 31.True or false: <br> is an empty tag. (a) False (b) True
- 32.🖌️ Which CSS property sets the letter colour? (a) color (b) background-color (c) font-weight (d) text-align
- 33.Which of these is an empty tag? (a) <p> (b) <h1> (c) <br> (d) <b>
- 34.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) on the browser tab (d) in a big heading
- 35.📋 Which list suits a shopping list in any order? (a) <ul> (b) <hr> (c) <ol> (d) <br>
- 36.What does justify-content: center 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
-
37.🎯 Which CSS selector matches this element?
<span class="menu" id="top">Hello</span> (a) p (b) .top (c) #intro (d) .menu - 38.True or false: .big is a class selector. (a) False (b) True
- 39.⚡ A JavaScript file usually ends with which extension? (a) .jpg (b) .js (c) .html (d) .css
-
40.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Sky is blue<br>Kites fly high<br>Birds sing<br>Stars shine</p>
Answer key
- height
- False
- in the head
- True
- 60
- <h1 id="intro">
- an id selector
- white
- rounds box corners
- Cascading Style Sheets
- fits every screen
- actions and changes
- :
- if
- Yes
- index.html
- A tiger asleep
- </p>
- black
- you type the URL
- ;
- No
- red
- 10
- starts a new line
- <li class="menu">
- True
- 2
- 8
- True
- True
- color
- <br>
- on the browser tab
- <ul>
- puts boxes in the middle
- .menu
- True
- .js
- 5
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids