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.🔍 One closing tag is missing. Which one?
<i>My best friend
<h2>My pets</h2>
<h3>Our school trip</h3> (a) </h2> (b) </h3> (c) </i> (d) </p> - 2.What is <input type="date"> for? (a) hides what you type (b) takes only numbers (c) picks a day (d) sends the form
- 3.📊 Which tag makes a heading cell? (a) <caption> (b) <table> (c) <td> (d) <th>
- 4.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h1> or <h3>? (a) <h3> (b) <h6> (c) <h4> (d) <h1>
- 5.True or false: a code editor hosts websites online. (a) True (b) False
-
6.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>My best friend</p>
<p>I love mangoes.</p> -
7.✍️ How many declarations (property: value pairs) are in this rule?
#top {
font-style: italic;
font-size: 20px;
} - 8.Which of these is true of a web browser? (a) is where we type code (b) stores a website’s files (c) answers page requests (d) has an address bar
-
9.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 9; i++) {
total = total + 8;
}
console.log(total); - 10.🎯 What kind of selector is .menu? (a) an element selector (b) an id selector (c) a class selector
- 11.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) width (c) src (d) alt
-
12.🔁 How many times does this code print “Hi”?
for (let i = 1; i < 6; i++) {
console.log("Hi");
} - 13.🌗 Is white on dark blue easy or hard to read? (a) hard to read (b) easy to read
-
14.⚡ What does this code print? (Look at the quotes!)
let x = "2";
let y = 3;
console.log(x + y); (a) Error (b) 5 (c) 23 - 15.🎯 Which sign starts an id selector? (a) # (b) . (c) & (d) @
-
16.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h2>Good morning!</h2>
<p>Hello, world!</p>
<h3>Good morning!</h3>
<p>Rain today</p> -
17.🎯 Which CSS selector matches this element?
<span class="star" id="top">Hello</span> (a) #top (b) .menu (c) #star (d) p - 18.Which of these is a closing tag? (a) <li> (b) <h1> (c) <body> (d) </body>
- 19.🔐 Is password a strong or a weak password? (a) weak (b) strong
- 20.⚖️ Which selector is the weakest? (a) an element selector (b) an id selector (c) a class selector
- 21.🎯 What kind of selector is li? (a) a class selector (b) an id selector (c) an element selector
- 22.🔢 When you open a web page, what comes right after “the browser asks it”? (a) DNS finds the server (b) the server sends files (c) you type the URL (d) the browser shows it
-
23.✍️ How many declarations (property: value pairs) are in this rule?
li {
width: 300px;
font-weight: bold;
} - 24.📝 What does <p> make? (a) a picture (b) a paragraph (c) a table (d) a link
-
25.📱 The screen is 414px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (max-width: 1024px) {
p {
font-size: 8px;
}
} - 26.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h4> or <h5>? (a) <h4> (b) <h5> (c) <h3> (d) <h2>
- 27.🎯 Which element does the selector h2 style? (a) <div class="menu"> (b) <h2 class="menu"> (c) <li> (d) <span id="hero">
- 28.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) red (c) black (d) magenta
- 29.True or false: .star is a class selector. (a) True (b) False
- 30.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
- 31.♿ A part of the page is under a <h4> heading. Which tag should its sub-heading use? (a) <h5> (b) <h4> (c) <h1> (d) <h3>
-
32.🖌️ What colour are the letters?
h1 {
background-color: yellow;
text-align: left;
font-size: 36px;
color: green;
} (a) yellow (b) purple (c) green - 33.🧩 Which language shows a pop-up message? (a) HTML (b) CSS (c) JavaScript
-
34.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (min-width: 480px) {
p {
font-size: 20px;
}
} - 35.🌐 Which one saves our .html files? (a) a code editor (b) a web browser (c) a web server
- 36.⚡ Which JavaScript word writes in the console? (a) let (b) if (c) for (d) console.log()
-
37.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red</p> - 38.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) width (d) height
- 39.Which of these is true of a web server? (a) stores a website’s files (b) shows pages from the web (c) shows line numbers (d) has an address bar
- 40.True or false: “add alt text to images” helps everyone use the page. (a) False (b) True
Answer key
- </i>
- picks a day
- <th>
- <h1>
- False
- 1
- 2
- has an address bar
- 72
- a class selector
- alt
- 5
- easy to read
- 23
- #
- 3
- #top
- </body>
- weak
- an element selector
- an element selector
- the server sends files
- 2
- a paragraph
- 8
- <h5>
- <h2 class="menu">
- black
- True
- in the body
- <h5>
- green
- JavaScript
- 12
- a code editor
- console.log()
- 2
- width
- stores a website’s files
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids