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 text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Rain today</p>
<p>Our school trip</p> (a) The red kite (b) Our school trip (c) Rain today - 2.Which of these is true of a web server? (a) answers page requests (b) colours code to help us (c) saves our .html files (d) opens web pages for us
- 3.True or false: body { margin: 0; } goes in style.css. (a) True (b) False
- 4.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
- 5.True or false: in <img>, width sets how wide it is. (a) False (b) True
-
6.💬 How many paragraphs show on the page?
<p>Rain today</p>
<p>I love mangoes.</p>
<!-- <p>The red kite</p> --> - 7.⚖️ Which selector is the weakest? (a) a class selector (b) an element selector (c) an id selector
- 8.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 9.🌈 Which hex code is white? (a) #00ffff (b) #0000ff (c) #ffff00 (d) #ffffff
-
10.⚖️ What colour is the text of this element?
<p class="red" id="intro">Hi</p>
CSS:
.red { color: yellow; }
p { color: orange; } (a) yellow (b) green (c) orange (d) white -
11.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="50"> -
12.🌍 What is the path in this URL?
http://www.example.com/news/today.html (a) www.example.com (b) http (c) /games/chess.html (d) /news/today.html -
13.🌍 What is the protocol in this URL?
https://learn.example.com/index.html (a) learn.example.com (b) https (c) /index.html (d) http - 14.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the head (d) the body
- 15.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a href="about.html">
- 16.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h4> or <h5>? (a) <h2> (b) <h6> (c) <h4> (d) <h5>
- 17.True or false: <input type="submit"> lets you pick only one. (a) False (b) True
- 18.✍️ Which sign goes between a property and its value? (a) ; (b) = (c) - (d) :
- 19.🔁 Which loop repeats code a set number of times? (a) for (b) if (c) else (d) let
- 20.Which of these is safe to do online? (a) share your OTP (b) share your password (c) post your home address (d) use a nickname in games
- 21.What does justify-content: space-between do? (a) packs boxes at the end (b) packs boxes at the start (c) puts boxes in the middle (d) equal gaps, none at ends
-
22.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>My pets</p>
<p>My best friend</p>
<h2>Our school trip</h2>
<p>My best friend</p>
<p>Good morning!</p> - 23.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) height (d) src
-
24.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 60px;
padding: 30px;
border: 3px solid black;
margin: 20px;
} - 25.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
-
26.🔍 Which line is missing its closing tag?
line 1: <b>Good morning!</b>
line 2: <u>My pets
line 3: <strong>Hello, world!</strong> (a) line 2 (b) line 1 (c) line 3 - 27.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
28.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 8; i++) {
total = total + 8;
}
console.log(total); - 29.True or false: a web server sends pages over the net. (a) False (b) True
-
30.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="350"> - 31.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h2> or <h6>? (a) <h5> (b) <h2> (c) <h6> (d) <h4>
-
32.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 360px;
justify-content: flex-end;
}
Inside are 3 boxes, each 100px wide (no margins). - 33.♿ Does this help everyone, or make the page harder to use: images with no alt? (a) helps everyone (b) makes it harder
- 34.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
- 35.🧩 Which language rounds box corners? (a) JavaScript (b) CSS (c) HTML
-
36.⚖️ What colour is the text of this element?
<h1 class="star" id="logo">Hi</h1>
CSS:
.star { color: red; }
h1 { color: yellow; } (a) yellow (b) black (c) green (d) red -
37.⚖️ What colour is the text of this element?
<p class="menu" id="end">Hi</p>
CSS:
p { color: yellow; }
p { color: white; } (a) green (b) blue (c) yellow (d) white - 38.Which of these is true of a code editor? (a) shows pages from the web (b) hosts websites online (c) has an address bar (d) saves our .html files
- 39.🛡️ Is it safe to use the same password on every site? (a) Yes (b) No
- 40.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
Answer key
- The red kite
- answers page requests
- True
- href
- True
- 2
- an element selector
- in the head
- #ffffff
- yellow
- 50
- /news/today.html
- https
- the body
- <a href="about.html">
- <h6>
- False
- :
- for
- use a nickname in games
- equal gaps, none at ends
- 5
- height
- 166
- in the head
- line 2
- an opening tag
- 64
- True
- 350
- <h6>
- 60
- makes it harder
- a code editor
- CSS
- red
- white
- saves our .html files
- No
- <ul>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids