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 element does the selector .big style? (a) <h1 class="red"> (b) <h2 class="box"> (c) <h1 class="big"> (d) <h1 id="big">
- 2.🛡️ Online: is it safe to meet an online stranger? (a) not safe (b) safe
-
3.📱 The screen is 1100px wide. Does the rule inside @media apply?
p {
font-size: 16px;
}
@media (max-width: 1024px) {
p {
font-size: 14px;
}
} (a) Yes (b) No - 4.💬 Does the browser show comments on the page? (a) No (b) Yes
- 5.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <img> (d) <link>
-
6.🔍 Which line is missing its closing tag?
line 1: <i>Our school trip</i>
line 2: <h3>I love mangoes.</h3>
line 3: <small>Hello, world! (a) line 1 (b) line 3 (c) line 2 - 7.Which of these is true of a web server? (a) is where we type code (b) answers page requests (c) saves our .html files (d) shows line numbers
- 8.💪 Which justify-content value equal gaps, none at ends? (a) space-between (b) flex-end (c) center (d) flex-start
- 9.♿ Who uses a screen reader? (a) only teachers (b) only robots (c) only coders (d) people who are blind
-
10.⚡ What does this code print? (Look at the quotes!)
let x = "3";
let y = 8;
console.log(x + y); (a) 11 (b) Error (c) 38 - 11.🌐 Which one stores a website’s files? (a) a web server (b) a code editor (c) a web browser
- 12.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h4> or <h1>? (a) <h4> (b) <h1> (c) <h5> (d) <h2>
- 13.✍️ How does a CSS comment start? (a) /* (b) # (c) // (d) <!--
-
14.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="300"> - 15.Which of these is true of <article>? (a) holds the logo and title (b) holds extra side notes (c) holds one blog post (d) holds copyright notes
- 16.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the first one (c) the shorter one (d) the later one
-
17.💪 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). -
18.⚡ What number does this code print?
let coins = 12;
coins = coins + 7;
coins = coins - 5;
console.log(coins); - 19.♿ A part of the page is under a <h4> heading. Which tag should its sub-heading use? (a) <h3> (b) <h6> (c) <h5> (d) <h2>
-
20.🖌️ Where does the text sit on its line?
h1 {
font-size: 36px;
color: green;
background-color: white;
text-align: center;
} (a) in the middle (b) on the left (c) on the right - 21.True or false: to log out on shared PCs is safe. (a) False (b) True
- 22.🔁 When does the else part run? (a) never (b) always (c) when if is true (d) when if is false
- 23.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
- 24.🎯 Can many elements share the same class? (a) No (b) Yes
- 25.🧭 Who is helped most by semantic tags? (a) screen-reader users (b) only the printer (c) only the server (d) nobody
- 26.♿ What does good colour contrast mean? (a) no colours at all (b) many bright colours (c) text stands out clearly (d) only red text
- 27.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
- 28.True or false: <td> makes one table row. (a) True (b) False
- 29.True or false: a code editor sends pages over the net. (a) True (b) False
- 30.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h4>? (a) <h4> (b) <h3> (c) <h1> (d) <h2>
- 31.💪 Which flexbox property spaces boxes along a row? (a) flex-direction (b) align-items (c) display: flex (d) justify-content
- 32.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
- 33.True or false: <title> goes in the body. (a) True (b) False
- 34.What does background-color do? (a) makes the text bold (b) colours behind the text (c) centres a heading (d) sets the letter colour
- 35.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a link (d) a table
- 36.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is a game (b) the site is free (c) the site is fast (d) the data is scrambled
-
37.📋 What number does the browser show next to “Mango”?
<ol start="6">
<li>Litchi</li>
<li>Jamun</li>
<li>Mango</li>
</ol> - 38.🌈 Which colour of light is strongest in rgb(118, 48, 226)? (a) red (b) blue (c) green
-
39.⚖️ What colour is the text of this element?
<h1 class="box" id="intro">Hi</h1>
CSS:
#intro { color: yellow; }
h1 { color: blue; } (a) yellow (b) red (c) white (d) blue - 40.🎯 How many elements on a page should have the same id? (a) any number (b) 2 (c) 5 (d) 1
Answer key
- <h1 class="big">
- not safe
- No
- No
- <a>
- line 3
- answers page requests
- space-between
- people who are blind
- 38
- a web server
- <h5>
- /*
- 300
- holds one blog post
- the later one
- 60
- 14
- <h5>
- in the middle
- True
- when if is false
- in the body
- Yes
- screen-reader users
- text stands out clearly
- -->
- False
- False
- <h4>
- justify-content
- in the body
- False
- colours behind the text
- a line across the page
- the data is scrambled
- 8
- blue
- yellow
- 1
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids