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 code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a src="about.html">
- 2.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <p> (d) <style>
-
3.🔁 What does this code print?
let age = 38;
if (age >= 23) {
console.log("teen");
} else {
console.log("child");
} (a) child (b) teen - 4.True or false: <ol> lists steps in order. (a) False (b) True
-
5.⚖️ What colour is the text of this element?
<p class="star" id="main">Hi</p>
CSS:
#main { color: red; }
p { color: yellow; } (a) red (b) blue (c) black (d) yellow - 6.🎯 How many elements on a page should have the same id? (a) 2 (b) 5 (c) any number (d) 1
- 7.💪 Which flexbox property turns on flexbox? (a) flex-direction (b) justify-content (c) display: flex (d) align-items
- 8.⚡ Which tag holds JavaScript in a page? (a) <script> (b) <style> (c) <code> (d) <js>
- 9.🧩 Which language makes a link? (a) JavaScript (b) CSS (c) HTML
- 10.📱 Responsive design means a page ___. (a) has no pictures (b) is only for laptops (c) never changes (d) fits every screen
- 11.🚀 Which file should this code go in: score = score + 1; (a) script.js (b) index.html (c) style.css
-
12.🔍 Which line is missing its closing tag?
line 1: <b>Hello, world!</b>
line 2: <u>Rain today
line 3: <p>I love mangoes.</p> (a) line 2 (b) line 3 (c) line 1 -
13.🔗 Which words do you click on?
<a href="news.html">School news</a> (a) news.html (b) href (c) Take the quiz (d) School news - 14.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) white (c) yellow (d) black
-
15.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Cricket is fun.</p>
<h3>Rain today</h3>
<h2>My best friend</h2>
<h4>Fun facts</h4> - 16.🚀 You change your code. What should you do to see the change? (a) switch off the PC (b) rename the folder (c) save and refresh (d) delete the file
- 17.True or false: <input type="checkbox"> is for an email address. (a) True (b) False
-
18.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (max-width: 1024px) {
p {
font-size: 12px;
}
} - 19.📦 In the box model, which part is the text or picture? (a) border (b) content (c) margin (d) padding
- 20.🌗 Is blue on purple easy or hard to read? (a) easy to read (b) hard to read
- 21.Which of these is padding? (a) space inside the border (b) the text or picture (c) a solid or dotted edge (d) the gap to other boxes
-
22.✍️ What is the selector in this CSS rule?
h1 {
padding: 8px;
background-color: yellow;
} (a) yellow (b) p (c) h1 (d) padding - 23.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
- 24.True or false: <td> makes one table row. (a) False (b) True
- 25.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <br> (d) <h1>
- 26.⚡ Which JavaScript word shows a pop-up box? (a) for (b) if (c) alert() (d) let
- 27.🌍 Which one is the page’s address? (a) the browser (b) the URL (c) HTTPS (d) the server
- 28.📊 In a table, which tag is a row? (a) <td> (b) <th> (c) <tb> (d) <tr>
- 29.⚡ Which word makes a new variable? (a) let (b) make (c) put (d) give
- 30.🎯 What kind of selector is #main? (a) an element selector (b) a class selector (c) an id selector
- 31.True or false: padding is space inside the border. (a) True (b) False
- 32.Which of these is a strong password? (a) Rain#Drop_42! (b) abcd1234 (c) 123456 (d) iloveyou
- 33.♿ Does this help everyone, or make the page harder to use: images with no alt? (a) helps everyone (b) makes it harder
- 34.Which of these has a closing tag? (a) <br> (b) <hr> (c) <h1> (d) <meta>
- 35.Which of these is not safe to do online? (a) use a strong password (b) put secrets in comments (c) keep passwords secret (d) check for https first
- 36.🌍 Which one scrambles data on its way? (a) the URL (b) the browser (c) the server (d) HTTPS
- 37.🧭 Which semantic tag helps you move around? (a) <nav> (b) <main> (c) <article> (d) <aside>
- 38.🖌️ Which CSS property colours behind the text? (a) font-family (b) color (c) background-color (d) font-weight
-
39.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>Hello, world!</p> -->
<p>Rain today</p> (a) My pets (b) Hello, world! (c) Rain today -
40.📊 How many rows does this table have?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
<tr><td>Orange</td><td>Papaya</td><td>Grapes</td><td>Litchi</td></tr>
<tr><td>Grapes</td><td>Orange</td><td>Papaya</td><td>Grapes</td></tr>
<tr><td>Papaya</td><td>Jamun</td><td>Orange</td><td>Litchi</td></tr>
</table>
Answer key
- <a href="about.html">
- <p>
- teen
- True
- red
- 1
- display: flex
- <script>
- HTML
- fits every screen
- script.js
- line 2
- School news
- yellow
- 4
- save and refresh
- False
- 12
- content
- hard to read
- space inside the border
- h1
- Yes
- False
- <h1>
- alert()
- the URL
- <tr>
- let
- an id selector
- True
- Rain#Drop_42!
- makes it harder
- <h1>
- put secrets in comments
- HTTPS
- <nav>
- background-color
- Hello, world!
- 4
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids