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 big is the text, in px?
h1 {
color: purple;
font-size: 32px;
text-align: center;
background-color: white;
} - 2.⚖️ Which selector is the weakest? (a) an id selector (b) a class selector (c) an element selector
- 3.Which of these does CSS do? (a) puts a picture on a page (b) makes a form box (c) gives the page structure (d) adds space around boxes
-
4.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>My pets</h2>
<h2>My pets</h2>
<p>Our school trip</p>
<p>Good morning!</p> - 5.🎯 Which element does the selector #end style? (a) <h2 class="end"> (b) <h2 id="hero"> (c) <h2 id="end"> (d) <li class="box">
- 6.True or false: <input type="email"> is for one line of words. (a) False (b) True
- 7.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
-
8.🔒 Is the connection to this address scrambled (encrypted)?
https://www.example.net/about.html (a) Yes (b) No - 9.📊 Which tag holds the whole table? (a) <table> (b) <tr> (c) <th> (d) <td>
- 10.🌈 Which colour is #000000? (a) cyan (b) magenta (c) bright green (d) black
-
11.⚡ What does this code print? (Look at the quotes!)
let x = "8";
let y = 4;
console.log(x + y); (a) 84 (b) Error (c) 12 -
12.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 300px;
justify-content: flex-start;
}
Inside are 3 boxes, each 80px wide (no margins). -
13.🔁 What does this code print?
let score = 28;
if (score >= 10) {
console.log("You win");
} else {
console.log("Play again");
} (a) Play again (b) You win - 14.🔢 To build and share your first web page, which comes first: “publish it online” or “write the HTML”? (a) write the HTML (b) publish it online
-
15.📱 The screen is 820px wide. Does the rule inside @media apply?
p {
font-size: 20px;
}
@media (min-width: 768px) {
p {
font-size: 26px;
}
} (a) Yes (b) No -
16.📋 What number does the browser show next to “Banana”?
<ol>
<li>Mango</li>
<li>Banana</li>
<li>Jamun</li>
</ol> - 17.📝 What does <br> do? (a) makes a list (b) starts a new line (c) makes text bold (d) adds a picture
-
18.✍️ How many declarations (property: value pairs) are in this rule?
h2 {
font-style: italic;
} - 19.♿ Does this help everyone, or make the page harder to use: write clear link text? (a) makes it harder (b) helps everyone
- 20.Which of these is margin? (a) space outside the border (b) the text or picture (c) the line round the box (d) the gap round content
- 21.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
-
22.✍️ How many declarations (property: value pairs) are in this rule?
.note {
font-weight: bold;
font-size: 20px;
border: 2px solid;
} - 23.True or false: <li> goes inside ul or ol. (a) False (b) True
-
24.🔁 How many numbers does this code print?
for (let i = 0; i < 8; i = i + 3) {
console.log(i);
} - 25.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) red (c) cyan (d) white
-
26.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="radio" name="colour"> Red
<input type="radio" name="colour"> Blue
<input type="radio" name="colour"> Orange
<input type="radio" name="colour"> Pink
<input type="radio" name="colour"> Green
</form> -
27.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="checkbox" name="sport"> Kabaddi
<input type="checkbox" name="sport"> Football
<input type="checkbox" name="sport"> Cricket
<input type="checkbox" name="sport"> Hockey
<input type="checkbox" name="sport"> Chess
</form> - 28.🚀 Which file should this code go in: <p>Hello!</p> (a) index.html (b) script.js (c) style.css
- 29.🌈 In #008500 the green part is the hex number 85. What is it as a normal number?
- 30.Which of these does CSS do? (a) sets colours and fonts (b) puts a picture on a page (c) gives the page structure (d) makes headings and lists
- 31.🖌️ Which CSS property sets the letter colour? (a) color (b) font-size (c) background-color (d) text-align
- 32.Which of these is a strong password? (a) 123456 (b) 111111 (c) Mango#Kite29! (d) iloveyou
-
33.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>The red kite</p>
<!-- <p>Good morning!</p> --> -
34.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> (a) A tiger asleep (b) kite.png (c) tiger.jpg (d) map.png - 35.📄 Can HTML on its own count button clicks? (a) No (b) Yes
- 36.Which colour pair is hard to read? (a) white on black (b) yellow on black (c) blue on purple (d) white on dark blue
- 37.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h1> or <h5>? (a) <h5> (b) <h2> (c) <h4> (d) <h1>
- 38.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 39.🔢 To build and share your first web page, what comes right after “test in a browser”? (a) add CSS styles (b) write the HTML (c) publish it online (d) plan what to show
-
40.⚖️ What colour is the text of this element?
<h1 class="big" id="intro">Hi</h1>
CSS:
h1 { color: black; }
h1 { color: purple; } (a) white (b) purple (c) red (d) black
Answer key
- 32
- an element selector
- adds space around boxes
- 3
- <h2 id="end">
- False
- red
- Yes
- <table>
- black
- 84
- 60
- You win
- write the HTML
- Yes
- 2
- starts a new line
- 1
- helps everyone
- space outside the border
- href
- 3
- True
- 3
- cyan
- 1
- 5
- index.html
- 133
- sets colours and fonts
- color
- Mango#Kite29!
- 2
- tiger.jpg
- No
- blue on purple
- <h5>
- a closing tag
- publish it online
- purple
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids