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.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 6; i++) {
total = total + i;
}
console.log(total); -
2.🖌️ How big is the text, in px?
h2 {
background-color: blue;
color: purple;
text-align: right;
font-size: 20px;
} -
3.🔍 One closing tag is missing. Which one?
<strong>Fun facts
<h3>Hello, world!</h3>
<h2>Our school trip</h2> (a) </i> (b) </h2> (c) </h3> (d) </strong> - 4.💪 Which flexbox property picks row or column? (a) flex-direction (b) justify-content (c) display: flex (d) align-items
- 5.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
-
6.🖌️ How big is the text, in px?
p {
font-size: 16px;
background-color: black;
color: orange;
text-align: right;
} - 7.📝 Which tag gives a form box a name you can click? (a) <hr> (b) <label> (c) <h1> (d) <title>
- 8.🌍 What do we call the computer that stores a website? (a) a mouse (b) a keyboard (c) a printer (d) a server
-
9.🌍 What is the protocol in this URL?
https://kids.example.org/news/today.html (a) http (b) /news/today.html (c) https (d) kids.example.org - 10.🔐 Is abcd1234 a strong or a weak password? (a) strong (b) weak
- 11.✍️ CSS declarations go inside which brackets? (a) { } (b) ( ) (c) [ ] (d) < >
-
12.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>The red kite</p>
<!-- <p>Rain today</p> --> (a) Rain today (b) Cricket is fun. (c) The red kite - 13.What does justify-content: flex-start do? (a) puts boxes in the middle (b) packs boxes at the end (c) packs boxes at the start (d) equal gaps, none at ends
- 14.📱 max-width: 600px applies when the screen is ___. (a) exactly 1000px (b) 600px or narrower (c) 600px or wider (d) turned off
- 15.⚡ Which JavaScript word makes a new variable? (a) alert() (b) let (c) for (d) console.log()
- 16.⚡ Which tag holds JavaScript in a page? (a) <script> (b) <style> (c) <js> (d) <code>
- 17.📱 What does a media query check? (a) the battery level (b) the time of day (c) the screen width (d) the page title
-
18.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>I love mangoes.</h2>
<p>Rain today</p> - 19.🎯 What kind of selector is #top? (a) an id selector (b) a class selector (c) an element selector
- 20.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) blue (c) red (d) yellow
- 21.🚀 Which file should this code go in: <img src="cat.png"> (a) style.css (b) script.js (c) index.html
- 22.🎨 What does CSS stand for? (a) Creative Sheet System (b) Cascading Style Sheets (c) Colourful Site Styles (d) Computer Style Sheets
- 23.📊 Where do <td> cells go? (a) inside a <tr> (b) inside a <li> (c) inside the <head> (d) inside a <p>
- 24.True or false: the server stores the site’s files. (a) True (b) False
- 25.Which of these has a closing tag? (a) <img> (b) <hr> (c) <p> (d) <meta>
- 26.🌈 Which colour of light is strongest in rgb(14, 11, 179)? (a) blue (b) green (c) red
- 27.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
-
28.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 610px;
justify-content: space-between;
}
Inside are 4 boxes, each 100px wide (no margins). - 29.🧭 Which semantic tag holds the main content? (a) <header> (b) <aside> (c) <nav> (d) <main>
- 30.Which of these is an empty tag? (a) <ul> (b) <p> (c) <br> (d) <li>
- 31.True or false: padding is space outside the border. (a) False (b) True
-
32.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>Cricket is fun.</p>
<!-- <p>Good morning!</p> --> (a) Cricket is fun. (b) Our school trip (c) Good morning! - 33.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h4> or <h2>? (a) <h2> (b) <h5> (c) <h3> (d) <h4>
- 34.True or false: <a> goes in the body. (a) True (b) False
- 35.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) <!DOCTYPE html> (c) </html> (d) <head>
-
36.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<p>Rain today</p> (a) Our school trip (b) I love mangoes. (c) Rain today (d) Cricket is fun. - 37.Which of these is true of <main>? (a) holds a side box of tips (b) holds one blog post (c) is the page’s key part (d) sits at the very top
-
38.⚖️ What colour is the text of this element?
<p class="big" id="logo">Hi</p>
CSS:
.big { color: blue; }
p { color: green; }
#logo { color: purple; } (a) yellow (b) green (c) purple (d) blue - 39.True or false: alert(score); goes in index.html. (a) False (b) True
-
40.⚡ What number does this code print?
let coins = 24;
coins = coins + 6;
coins = coins - 5;
console.log(coins);
Answer key
- 21
- 20
- </strong>
- flex-direction
- <ol>
- 16
- <label>
- a server
- https
- weak
- { }
- Rain today
- packs boxes at the start
- 600px or narrower
- let
- <script>
- the screen width
- 2
- an id selector
- red
- index.html
- Cascading Style Sheets
- inside a <tr>
- True
- <p>
- blue
- a slash /
- 70
- <main>
- <br>
- False
- Good morning!
- <h5>
- True
- <!DOCTYPE html>
- Our school trip
- is the page’s key part
- purple
- False
- 25
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids