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.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the first one (b) the shorter one (c) the later one (d) neither
- 2.💪 Which justify-content value puts boxes in the middle? (a) space-between (b) flex-end (c) flex-start (d) center
-
3.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 120px;
padding: 20px;
border: 5px solid black;
margin: 5px;
} - 4.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z
- 5.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) attribute (c) address (d) element
-
6.📊 How many rows does this table have?
<table>
<tr><td>Jamun</td><td>Litchi</td></tr>
<tr><td>Guava</td><td>Orange</td></tr>
</table> -
7.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 260px;
justify-content: flex-end;
}
Inside are 3 boxes, each 60px wide (no margins). -
8.🔒 Is the connection to this address scrambled (encrypted)?
https://learn.example.com/index.html (a) No (b) Yes - 9.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) answers page requests (d) turns HTML into a page
-
10.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 240px;
justify-content: center;
}
Inside are 2 boxes, each 60px wide (no margins). -
11.🔁 How many numbers does this code print?
for (let i = 0; i < 15; i = i + 4) {
console.log(i);
} - 12.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
- 13.⚡ What does JavaScript add to a web page? (a) the page title (b) only colours (c) actions and changes (d) the domain name
-
14.📋 What number does the browser show next to “Litchi”?
<ol start="6">
<li>Orange</li>
<li>Jamun</li>
<li>Litchi</li>
</ol> -
15.🔁 What is the LAST number this code prints?
for (let i = 0; i < 6; i = i + 4) {
console.log(i);
} - 16.🧩 Which language rounds box corners? (a) HTML (b) CSS (c) JavaScript
- 17.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
18.🔍 One closing tag is missing. Which one?
<p>Rain today
<h2>Good morning!</h2>
<strong>Hello, world!</strong> (a) </strong> (b) </h3> (c) </p> (d) </h2> - 19.Which of these is a strong password? (a) password (b) 111111 (c) iloveyou (d) Mango#Kite29!
-
20.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>Rain today</p>
<p>My best friend</p>
<p>I love mangoes.</p> (a) Rain today (b) I love mangoes. (c) My best friend (d) Fun facts - 21.🚀 Where in index.html does the link to style.css go? (a) in the head (b) after </html> (c) inside a <p> (d) in the footer
- 22.⚡ Which JavaScript word runs code when true? (a) alert() (b) console.log() (c) if (d) let
-
23.🔁 How many times does this code print “Well done”?
for (let i = 1; i <= 9; i++) {
console.log("Well done");
} - 24.Which of these has a closing tag? (a) <hr> (b) <br> (c) <img> (d) <li>
-
25.🔠 How many headings are in this code?
<h1>My pets</h1>
<h4>My best friend</h4>
<h3>I love mangoes.</h3>
<p>Cricket is fun.</p>
<p>My pets</p> -
26.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="250"> - 27.🔢 To build and share your first web page, which comes first: “write the HTML” or “plan what to show”? (a) write the HTML (b) plan what to show
- 28.📝 What does <br> do? (a) adds a picture (b) makes a list (c) starts a new line (d) makes text bold
- 29.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h1> (b) <h2> (c) <h6> (d) <h3>
-
30.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="250"> (a) dog.jpg (b) The full moon (c) A happy dog (d) width -
31.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Mango</li>
</ul> - 32.🌈 Which colour of light is strongest in rgb(250, 20, 72)? (a) red (b) green (c) blue
- 33.🔢 On a typical page, from top to bottom, which comes first: “<main>” or “<nav>”? (a) <nav> (b) <main>
- 34.True or false: .note is an element selector. (a) True (b) False
-
35.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 220px;
justify-content: flex-end;
}
Inside are 2 boxes, each 80px wide (no margins). -
36.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="250"> (a) tiger.jpg (b) An old fort (c) kite.png (d) fort.jpg - 37.🧭 Is <aside> semantic or not semantic? (a) not semantic (b) semantic
-
38.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 90px;
justify-content: flex-start;
}
Inside are 2 boxes, each 40px wide (no margins). - 39.🛡️ Online: is it safe to type a password on http? (a) not safe (b) safe
- 40.🧩 Which language shows a pop-up message? (a) CSS (b) HTML (c) JavaScript
Answer key
- the later one
- center
- 180
- F
- element
- 2
- 80
- Yes
- answers page requests
- 60
- 4
- <ul>
- actions and changes
- 8
- 4
- CSS
- a closing tag
- </p>
- Mango#Kite29!
- Fun facts
- in the head
- if
- 9
- <li>
- 3
- 250
- plan what to show
- starts a new line
- <h1>
- A happy dog
- 2
- red
- <nav>
- False
- 60
- fort.jpg
- semantic
- 10
- not safe
- JavaScript
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids