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 many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="300"> - 2.🎨 A CSS file usually ends with which extension? (a) .html (b) .js (c) .png (d) .css
- 3.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) opens it in a new tab (d) hides the link
-
4.✍️ Which property is set to italic in this rule?
.note {
font-style: italic;
color: red;
width: 300px;
} (a) font-style (b) italic (c) font-size (d) color -
5.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (min-width: 768px) {
p {
font-size: 22px;
}
} -
6.⚖️ What colour is the text of this element?
<h2 class="note" id="end">Hi</h2>
CSS:
.note { color: white; }
#end { color: purple; } (a) blue (b) white (c) purple (d) black -
7.✍️ How many declarations (property: value pairs) are in this rule?
h1 {
width: 300px;
border: 2px solid;
} -
8.🔗 Where does this link open?
<a href="games.html">Play games</a> (a) in a new tab (b) in the same tab - 9.♿ A part of the page is under a <h3> heading. Which tag should its sub-heading use? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
- 10.🎯 Which element does the selector li style? (a) <li class="menu"> (b) <p id="main"> (c) <span class="menu"> (d) <div>
- 11.True or false: HTML reacts to a button click. (a) True (b) False
- 12.🔁 Which word runs code only when something is true? (a) for (b) let (c) log (d) if
-
13.🔗 Which words do you click on?
<a href="contact.html">Maths fun</a> (a) contact.html (b) href (c) Maths fun (d) Art corner - 14.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) green (d) blue
-
15.📊 How many heading cells (<th>) does this table have?
<table>
<tr><th>Name</th><th>Fruit</th></tr>
<tr><td>Mango</td><td>Grapes</td></tr>
</table> -
16.🖌️ Where does the text sit on its line?
li {
text-align: left;
font-size: 16px;
background-color: red;
color: purple;
} (a) on the left (b) in the middle (c) on the right - 17.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h2> or <h1>? (a) <h1> (b) <h2> (c) <h4> (d) <h3>
-
18.📊 How many heading cells (<th>) does this table have?
<table>
<tr><th>Name</th><th>Fruit</th></tr>
<tr><td>Grapes</td><td>Orange</td></tr>
<tr><td>Jamun</td><td>Mango</td></tr>
<tr><td>Banana</td><td>Mango</td></tr>
</table> -
19.⚖️ What colour is the text of this element?
<h1 class="box" id="hero">Hi</h1>
CSS:
#hero { color: green; }
h1 { color: orange; }
.box { color: purple; } (a) red (b) orange (c) green (d) purple -
20.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="radio" name="fruit"> Mango
<input type="radio" name="fruit"> Papaya
<input type="radio" name="fruit"> Guava
<input type="radio" name="fruit"> Litchi
</form> - 21.🌈 Which colour is #00ffff? (a) red (b) blue (c) black (d) cyan
- 22.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h1> (c) <br> (d) <h6>
- 23.🎯 Which element does the selector #logo style? (a) <h1 class="box"> (b) <p id="end"> (c) <p class="logo"> (d) <p id="logo">
- 24.🧭 Which semantic tag holds one blog post? (a) <header> (b) <main> (c) <article> (d) <nav>
- 25.True or false: a web server stores a website’s files. (a) False (b) True
- 26.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <p> (c) <table> (d) <ul>
- 27.True or false: .note is a class selector. (a) False (b) True
-
28.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p> - 29.True or false: <img> goes in the head. (a) True (b) False
-
30.🔍 Which line is missing its closing tag?
line 1: <u>Fun facts</u>
line 2: <em>Rain today</em>
line 3: <h2>Our school trip (a) line 1 (b) line 2 (c) line 3 - 31.✍️ Which sign goes between a property and its value? (a) - (b) ; (c) = (d) :
- 32.🚀 Which file should this code go in: h1 { font-size: 32px; } (a) style.css (b) script.js (c) index.html
- 33.🌐 Which one turns HTML into a page? (a) a web browser (b) a code editor (c) a web server
- 34.🔁 Which loop repeats code a set number of times? (a) else (b) let (c) for (d) if
-
35.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (max-width: 1024px) {
p {
font-size: 6px;
}
} - 36.📱 What does a media query check? (a) the page title (b) the time of day (c) the battery level (d) the screen width
-
37.♿ Is this heading order correct (no level skipped)?
<h1> → <h2> → <h3> → <h2> (a) No (b) Yes -
38.📊 How many cells are in each row?
<table>
<tr><th>Name</th><th>Fruit</th></tr>
<tr><td>Jamun</td><td>Mango</td></tr>
<tr><td>Jamun</td><td>Grapes</td></tr>
</table> -
39.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (min-width: 600px) {
p {
font-size: 20px;
}
} - 40.📄 Can HTML on its own make a form? (a) No (b) Yes
Answer key
- 300
- .css
- opens it in a new tab
- font-style
- 20
- purple
- 2
- in the same tab
- <h4>
- <li class="menu">
- False
- if
- Maths fun
- red
- 2
- on the left
- <h1>
- 2
- green
- 1
- cyan
- <h1>
- <p id="logo">
- <article>
- True
- <meta charset="utf-8">
- True
- 2
- False
- line 3
- :
- style.css
- a web browser
- for
- 6
- the screen width
- Yes
- 2
- 20
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids