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 is the domain name in this URL?
https://www.example.net/maths/tables.html (a) www.example.net (b) /maths/tables.html (c) https (d) learn.example.com - 2.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
-
3.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>My pets</p> -->
<p>Hello, world!</p>
<p>I love mangoes.</p> (a) Hello, world! (b) My pets (c) Rain today (d) I love mangoes. -
4.🔗 Which words do you click on?
<a href="https://example.com">Visit the site</a> (a) Maths fun (b) href (c) https://example.com (d) Visit the site - 5.Which of these is safe to do online? (a) download from pop-ups (b) think before you post (c) click prize links (d) meet an online stranger
-
6.⚖️ What colour is the text of this element?
<h1 class="menu" id="end">Hi</h1>
CSS:
h1 { color: green; }
h1 { color: orange; } (a) blue (b) orange (c) green (d) purple - 7.What does text-align do? (a) makes letters bigger (b) sets the letter colour (c) centres a heading (d) colours behind the text
- 8.What does background-color do? (a) sets the letter colour (b) colours behind the text (c) makes the text bold (d) centres a heading
-
9.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>Hello, world!</p>
<h2>My best friend</h2> - 10.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <\h2> (c) <h2> (d) <h2/>
-
11.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 240px;
padding: 15px;
border: 4px solid black;
margin: 20px;
} -
12.⚖️ What colour is the text of this element?
<p class="note" id="top">Hi</p>
CSS:
#top { color: orange; }
#top { color: black; } (a) blue (b) black (c) orange (d) green -
13.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Planets</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Space Facts (b) body (c) Planets (d) We won by 5 runs. - 14.🎯 Which element does the selector .big style? (a) <p class="red"> (b) <p id="big"> (c) <p class="big"> (d) <h1 class="box">
- 15.⚡ Which word makes a new variable? (a) put (b) give (c) let (d) make
- 16.🎯 Which sign starts a class selector? (a) # (b) & (c) @ (d) .
- 17.♿ Which link text is clearest? (a) link (b) here (c) Read the fruit facts (d) click here
- 18.📦 In the box model, which part is space inside the border? (a) border (b) margin (c) padding (d) content
- 19.True or false: margin is the gap to other boxes. (a) False (b) True
- 20.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) red (d) green
- 21.True or false: <caption> makes one data cell. (a) True (b) False
- 22.🌈 In #007c00 the green part is the hex number 7c. What is it as a normal number?
- 23.🎨 Which tag connects an outside CSS file? (a) <link> (b) <img> (c) <css> (d) <a>
- 24.Which of these is a closing tag? (a) <title> (b) <h1> (c) <body> (d) </p>
- 25.📦 In the box model, which part is the gap round content? (a) padding (b) margin (c) content (d) border
- 26.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ol> (d) <ul>
- 27.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
- 28.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 29.🎯 Which element does the selector .menu style? (a) <li class="menu"> (b) <li class="note"> (c) <div class="big"> (d) <li id="menu">
- 30.🚀 Which file should this code go in: body { margin: 0; } (a) script.js (b) style.css (c) index.html
- 31.True or false: <ol> is an ordered list. (a) True (b) False
-
32.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (min-width: 480px) {
p {
font-size: 28px;
}
} -
33.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>Hello, world!</p> -->
<p>Good morning!</p> (a) Cricket is fun. (b) Hello, world! (c) Good morning! -
34.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="400"> (a) map.png (b) cake.jpg (c) A red kite (d) kite.png -
35.🔗 Where does this link open?
<a href="maths.html" target="_blank">Art corner</a> (a) in a new tab (b) in the same tab -
36.🎯 Which CSS selector matches this element?
<h1 class="box" id="top">Hello</h1> (a) #box (b) #intro (c) .top (d) .box - 37.🌐 Which one hosts websites online? (a) a web browser (b) a code editor (c) a web server
- 38.🚀 Which file should this code go in: alert("Hi"); (a) script.js (b) style.css (c) index.html
- 39.True or false: HTML makes a link. (a) False (b) True
- 40.🔐 Is Mango#Kite29! a strong or a weak password? (a) weak (b) strong
Answer key
- www.example.net
- in the body
- My pets
- Visit the site
- think before you post
- orange
- centres a heading
- colours behind the text
- 2
- </h2>
- 318
- black
- Planets
- <p class="big">
- let
- .
- Read the fruit facts
- padding
- True
- blue
- False
- 124
- <link>
- </p>
- padding
- <li>
- in the head
- Yes
- <li class="menu">
- style.css
- True
- 20
- Hello, world!
- kite.png
- in a new tab
- .box
- a web server
- script.js
- True
- strong
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids