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 of these is an opening tag? (a) </title> (b) <li> (c) </p> (d) </h1>
-
2.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 230px;
padding: 10px;
border: 4px solid black;
margin: 5px;
} - 3.♿ Does this help everyone, or make the page harder to use: colour as the only clue? (a) makes it harder (b) helps everyone
- 4.📦 In the box model, which part is the gap to other boxes? (a) margin (b) padding (c) border (d) content
-
5.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Papaya</li>
<li>Jamun</li>
</ul> -
6.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Kites fly high<br>Birds sing<br>Rivers flow</p> - 7.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) <h3/> (c) <h3> (d) </h3>
-
8.✍️ Which property is set to 20px in this rule?
#top {
width: 300px;
font-size: 20px;
} (a) background-color (b) 20px (c) font-size (d) text-align -
9.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 130px;
padding: 20px;
border: 5px solid black;
margin: 5px;
} - 10.♿ A part of the page is under a <h3> heading. Which tag should its sub-heading use? (a) <h1> (b) <h4> (c) <h3> (d) <h6>
-
11.🎯 Which CSS selector matches this element?
<span class="red" id="hero">Hello</span> (a) #hero (b) .hero (c) p (d) #top - 12.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) in a big heading (d) on the browser tab
- 13.🎨 Which tag connects an outside CSS file? (a) <a> (b) <link> (c) <img> (d) <css>
- 14.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <html> (d) <head>
- 15.True or false: <b> has a closing tag. (a) False (b) True
- 16.🖌️ Which CSS property colours behind the text? (a) font-weight (b) font-size (c) background-color (d) font-family
- 17.📦 In the box model, which part is the line round the box? (a) margin (b) padding (c) content (d) border
-
18.🖌️ What colour is behind the letters?
li {
color: purple;
background-color: white;
font-size: 32px;
text-align: right;
} (a) white (b) blue (c) purple - 19.📊 Which tag makes one table row? (a) <th> (b) <td> (c) <tr> (d) <caption>
-
20.🔁 How many numbers does this code print?
for (let i = 0; i < 17; i = i + 4) {
console.log(i);
} - 21.🔐 Is 123456 a strong or a weak password? (a) strong (b) weak
-
22.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Mango</li>
<li>Banana</li>
<li>Guava</li>
</ul> - 23.📱 Which tag helps phones show a page at the right size? (a) the viewport meta tag (b) the title tag (c) the br tag (d) the hr tag
-
24.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Our school trip</p> -->
<p>Fun facts</p>
<p>Rain today</p> (a) Fun facts (b) Hello, world! (c) Rain today (d) Our school trip - 25.📝 What does <hr> draw? (a) a line across the page (b) a link (c) a table (d) a picture
- 26.📝 Which tag holds a whole form? (a) <ol> (b) <input> (c) <form> (d) <table>
- 27.🌗 Is white on black easy or hard to read? (a) easy to read (b) hard to read
- 28.🌈 In #0000b5 the blue part is the hex number b5. What is it as a normal number?
- 29.True or false: “use headings in order” helps everyone use the page. (a) True (b) False
-
30.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>My best friend</p>
<!-- <p>Good morning!</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>My pets</p> --> -
31.⚖️ What colour is the text of this element?
<p class="red" id="top">Hi</p>
CSS:
#top { color: green; }
#top { color: purple; } (a) red (b) green (c) purple (d) white -
32.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Roses are red<br>Sky is blue</p> - 33.💪 Which flexbox property sets space between boxes? (a) gap (b) justify-content (c) display: flex (d) align-items
-
34.🖌️ Where does the text sit on its line?
h1 {
text-align: center;
color: red;
font-size: 28px;
background-color: green;
} (a) in the middle (b) on the left (c) on the right - 35.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) width (c) height (d) alt
-
36.⚖️ What colour is the text of this element?
<h1 class="box" id="intro">Hi</h1>
CSS:
h1 { color: black; }
h1 { color: blue; } (a) blue (b) green (c) orange (d) black - 37.🔍 Which is the odd one out? (a) sends pages over the net (b) hosts websites online (c) turns HTML into a page (d) answers page requests
- 38.🌈 Which hex code is cyan? (a) #000000 (b) #00ffff (c) #ffff00 (d) #0000ff
- 39.✍️ CSS declarations go inside which brackets? (a) ( ) (b) { } (c) [ ] (d) < >
-
40.🌍 What is the protocol in this URL?
https://www.example.com/art/gallery.html (a) http (b) www.example.com (c) https (d) /art/gallery.html
Answer key
- <li>
- 268
- makes it harder
- margin
- 3
- 4
- </h3>
- font-size
- 190
- <h4>
- #hero
- on the browser tab
- <link>
- <!DOCTYPE html>
- True
- background-color
- border
- white
- <tr>
- 5
- weak
- 6
- the viewport meta tag
- Our school trip
- a line across the page
- <form>
- easy to read
- 181
- True
- 1
- purple
- 3
- gap
- in the middle
- height
- blue
- turns HTML into a page
- #00ffff
- { }
- https
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids