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 does an HTML comment end? (a) */ (b) // (c) >> (d) -->
- 2.Which of these is safe to do online? (a) download from pop-ups (b) think before you post (c) share your password (d) click prize links
- 3.♿ A part of the page is under a <h4> heading. Which tag should its sub-heading use? (a) <h6> (b) <h1> (c) <h4> (d) <h5>
- 4.🎯 How many elements on a page should have the same id? (a) any number (b) 1 (c) 5 (d) 2
- 5.📛 In <a href="x.html">, what is href? (a) an attribute (b) a closing tag (c) a comment (d) an element name
- 6.🌈 Which hex code is yellow? (a) #0000ff (b) #ffff00 (c) #00ffff (d) #ff00ff
-
7.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="radio" name="fruit"> Litchi
<input type="radio" name="fruit"> Mango
<input type="radio" name="fruit"> Papaya
</form> - 8.🎨 Which tag holds CSS inside the head? (a) <style> (b) <script> (c) <css> (d) <body>
- 9.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ol> (c) <ul>
-
10.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="checkbox" name="fruit"> Papaya
<input type="checkbox" name="fruit"> Litchi
<input type="checkbox" name="fruit"> Guava
<input type="checkbox" name="fruit"> Mango
<input type="checkbox" name="fruit"> Banana
</form> - 11.What does justify-content: center do? (a) puts boxes in the middle (b) packs boxes at the start (c) packs boxes at the end (d) equal gaps, none at ends
- 12.True or false: .menu is a class selector. (a) False (b) True
- 13.True or false: <table> holds the whole table. (a) True (b) False
- 14.📋 Which list tag is one item of a list? (a) <ul> (b) <li> (c) <ol>
- 15.Which of these is a weak password? (a) Rain#Drop_42! (b) Blue@Tiger_74 (c) password (d) Kite_Fl1es@Dawn
-
16.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>Rain today</p>
<!-- <p>My pets</p> --> (a) Our school trip (b) My pets (c) Rain today - 17.🧭 Is <nav> semantic or not semantic? (a) not semantic (b) semantic
-
18.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="250"> (a) A red kite (b) kite.png (c) cake.jpg (d) map.png -
19.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 4; i++) {
total = total + 7;
}
console.log(total); - 20.🚀 Which file should this code go in: <a href="a.html">Go</a> (a) script.js (b) style.css (c) index.html
- 21.What is <input type="checkbox"> for? (a) picks a day (b) sends the form (c) lets you pick only one (d) lets you tick many
-
22.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) A happy dog (b) cake.jpg (c) width (d) Birthday cake - 23.📝 What does <hr> draw? (a) a picture (b) a table (c) a line across the page (d) a link
- 24.True or false: <p> goes in the head. (a) True (b) False
- 25.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) height (c) width (d) alt
-
26.⚡ What number does this code print?
let coins = 16;
coins = coins + 19;
coins = coins - 30;
console.log(coins); -
27.🖌️ How big is the text, in px?
h1 {
background-color: blue;
font-size: 12px;
color: green;
text-align: center;
} - 28.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
-
29.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Match report</h1>
<p>Here is my best one.</p>
</body>
</html> (a) body (b) Match report (c) Here is my best one. (d) Riya’s Recipes - 30.♿ Does this help everyone, or make the page harder to use: skipping heading levels? (a) makes it harder (b) helps everyone
- 31.🚀 Which file should this code go in: alert(score); (a) style.css (b) script.js (c) index.html
- 32.🧭 How many <main> parts should a page have? (a) three (b) one (c) ten (d) none
- 33.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h6> or <h1>? (a) <h2> (b) <h1> (c) <h4> (d) <h6>
- 34.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to add colour (d) to leave notes
-
35.✍️ What value is given to font-style in this rule?
h1 {
font-style: italic;
font-weight: bold;
width: 300px;
color: red;
} (a) italic (b) 20px (c) font-style (d) red - 36.🎯 Which element does the selector .red style? (a) <h1 class="box"> (b) <h2 class="star"> (c) <h1 id="red"> (d) <h1 class="red">
-
37.🔍 One closing tag is missing. Which one?
<h1>The red kite</h1>
<h2>Cricket is fun.
<i>My pets</i> (a) </h2> (b) </h3> (c) </h1> (d) </i> -
38.🌍 What is the protocol in this URL?
https://learn.example.com/games/chess.html (a) /games/chess.html (b) http (c) learn.example.com (d) https - 39.💪 Which justify-content value packs boxes at the start? (a) space-between (b) flex-end (c) center (d) flex-start
- 40.🚀 Which file should this code go in: console.log(5 + 2); (a) index.html (b) script.js (c) style.css
Answer key
- -->
- think before you post
- <h5>
- 1
- an attribute
- #ffff00
- 1
- <style>
- <li>
- 5
- puts boxes in the middle
- True
- True
- <li>
- password
- My pets
- semantic
- kite.png
- 28
- index.html
- lets you tick many
- Birthday cake
- a line across the page
- False
- alt
- 5
- 12
- <!DOCTYPE html>
- Match report
- makes it harder
- script.js
- one
- <h6>
- to leave notes
- italic
- <h1 class="red">
- </h2>
- https
- flex-start
- script.js
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids