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>Good morning!</p>
<p>My pets</p>
<!-- <p>The red kite</p> --> (a) Good morning! (b) My pets (c) The red kite - 2.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
- 3.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <a href="about.html">
-
4.⚡ What does this code show?
let name = "Aman";
console.log("Hi, " + name + "!"); (a) name (b) Aman (c) Hi, name! (d) Hi, Aman! -
5.🖌️ How big is the text, in px?
h2 {
color: green;
text-align: center;
background-color: purple;
font-size: 40px;
} -
6.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 260px;
justify-content: space-between;
}
Inside are 3 boxes, each 40px wide (no margins). -
7.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p>
<p>Hello, world!</p>
<p>Fun facts</p> - 8.🧭 Is <footer> semantic or not semantic? (a) semantic (b) not semantic
- 9.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
10.🖌️ What colour is behind the letters?
li {
background-color: orange;
font-size: 24px;
text-align: center;
color: red;
} (a) red (b) orange (c) white - 11.Which of these goes in the head? (a) <ul> (b) <title> (c) <h1> (d) <table>
-
12.📋 What number does the browser show next to “Guava”?
<ol>
<li>Grapes</li>
<li>Litchi</li>
<li>Guava</li>
</ol> -
13.✍️ What value is given to width in this rule?
p {
width: 300px;
text-align: center;
} (a) italic (b) 300px (c) red (d) width - 14.True or false: img is a class selector. (a) False (b) True
- 15.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the later one (c) the shorter one (d) the first one
- 16.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) width (d) height
-
17.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>Good morning!</h2>
<h2>I love mangoes.</h2>
<h2>Fun facts</h2>
<p>Fun facts</p> -
18.🔗 Which address opens when you click this link?
<a href="maths.html">Art corner</a> (a) maths.html (b) Art corner (c) art.html (d) news.html - 19.🔍 Which is the odd one out? (a) makes headings and lists (b) makes a form box (c) sets colours and fonts (d) makes a link
- 20.🔢 To build and share your first web page, which comes first: “write the HTML” or “add CSS styles”? (a) add CSS styles (b) write the HTML
- 21.True or false: <h1> goes in the head. (a) True (b) False
- 22.📝 Which input type sends the form? (a) number (b) email (c) submit (d) text
- 23.True or false: <table> makes one data cell. (a) False (b) True
- 24.🧭 Is <main> semantic or not semantic? (a) not semantic (b) semantic
- 25.🔁 What does i++ do? (a) prints i (b) adds 1 to i (c) takes 1 from i (d) doubles i
-
26.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<h2>Good morning!</h2>
<p>Good morning!</p> -
27.⚡ What number does this code print?
let runs = 17;
runs = runs + 10;
runs = runs - 24;
console.log(runs); -
28.✍️ What is the selector in this CSS rule?
.note {
border: 2px solid;
width: 300px;
color: red;
background-color: yellow;
} (a) #top (b) .note (c) border (d) 300px - 29.🖼️ Does <img> need a closing tag? (a) No (b) Yes
-
30.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (min-width: 600px) {
p {
font-size: 26px;
}
} - 31.Which of these is a closing tag? (a) <p> (b) <b> (c) </title> (d) <h1>
-
32.⚖️ What colour is the text of this element?
<p class="red" id="main">Hi</p>
CSS:
p { color: yellow; }
p { color: purple; } (a) black (b) red (c) yellow (d) purple - 33.🚀 Which tag loads script.js into a page? (a) <a href="script.js"> (b) <script src="script.js"> (c) <link script.js> (d) <js src="script.js">
- 34.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <body> (d) <!DOCTYPE html>
- 35.True or false: <title> goes in the head. (a) True (b) False
-
36.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="300"> (a) map.png (b) A red kite (c) kite.png (d) cake.jpg -
37.🖌️ What colour is behind the letters?
h1 {
font-size: 28px;
text-align: left;
color: red;
background-color: green;
} (a) purple (b) red (c) green - 38.⚡ What does alert() show? (a) a table (b) a picture (c) a new tab (d) a pop-up box
- 39.🔢 When you open a web page, which comes first: “you type the URL” or “the browser asks it”? (a) you type the URL (b) the browser asks it
- 40.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) a comment (d) an attribute
Answer key
- The red kite
- href
- <a href="about.html">
- Hi, Aman!
- 40
- 70
- 3
- semantic
- Yes
- orange
- <title>
- 3
- 300px
- False
- the later one
- alt
- 2
- maths.html
- sets colours and fonts
- write the HTML
- False
- submit
- False
- semantic
- adds 1 to i
- 2
- 3
- .note
- No
- 20
- </title>
- purple
- <script src="script.js">
- <!DOCTYPE html>
- True
- kite.png
- green
- a pop-up box
- you type the URL
- an attribute
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids