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 big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) Easy snacks (c) Riya’s Recipes (d) body - 2.🌈 In #330000 the red part is the hex number 33. What is it as a normal number?
- 3.🧭 Which semantic tag holds a side box of tips? (a) <main> (b) <footer> (c) <aside> (d) <article>
- 4.🔢 On a typical page, from top to bottom, which comes first: “<main>” or “<header>”? (a) <header> (b) <main>
-
5.🔁 What is the LAST number this code prints?
for (let i = 0; i < 17; i = i + 2) {
console.log(i);
} -
6.🔁 What is the LAST number this code prints?
for (let i = 0; i < 6; i = i + 3) {
console.log(i);
} -
7.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<p>Fun facts</p> (a) Hello, world! (b) Cricket is fun. (c) Fun facts (d) My pets -
8.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>I love mangoes.</p>
<h2>Fun facts</h2>
<p>My pets</p>
<p>I love mangoes.</p>
<p>My pets</p> - 9.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
-
10.⚡ What does this code show?
let name = "Zoya";
alert("Well done, " + name + "!"); (a) Zoya (b) name (c) Well done, Zoya! (d) Well done, name! - 11.✍️ In color: blue; which part is the property? (a) : (b) color (c) ; (d) blue
- 12.🧩 Which language checks a quiz answer? (a) CSS (b) JavaScript (c) HTML
- 13.🔢 On a typical page, from top to bottom, which comes first: “<nav>” or “<main>”? (a) <main> (b) <nav>
- 14.📝 Which input type is for one line of words? (a) date (b) text (c) email (d) password
- 15.What is <input type="number"> for? (a) is for one line of words (b) hides what you type (c) picks a day (d) takes only numbers
-
16.🔁 How many numbers does this code print?
for (let i = 0; i < 14; i = i + 2) {
console.log(i);
} -
17.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 60px;
padding: 15px;
border: 1px solid black;
margin: 5px;
} - 18.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<html>”? (a) <!DOCTYPE html> (b) <html>
- 19.🎯 Which sign starts a class selector? (a) & (b) . (c) # (d) @
- 20.♿ 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>
- 21.🚀 Which tag loads script.js into a page? (a) <link script.js> (b) <script src="script.js"> (c) <a href="script.js"> (d) <js src="script.js">
- 22.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
23.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="400"> - 24.🔢 In a basic web page file, which comes first: “</html>” or “</body>”? (a) </body> (b) </html>
-
25.🔁 What does this code print?
let marks = 46;
if (marks > 31) {
console.log("Pass");
} else {
console.log("Try again");
} (a) Try again (b) Pass - 26.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h4>? (a) <h3> (b) <h2> (c) <h4> (d) <h1>
- 27.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
- 28.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) black (c) magenta (d) yellow
- 29.Which of these is a strong password? (a) riya2014 (b) 111111 (c) abcd1234 (d) Mango#Kite29!
- 30.Which of these is safe to do online? (a) click prize links (b) download from pop-ups (c) think before you post (d) put secrets in comments
-
31.🔁 How many times does this code print “Hi”?
for (let i = 0; i <= 2; i++) {
console.log("Hi");
} -
32.🔗 Which address opens when you click this link?
<a href="art.html">Contact us</a> (a) news.html (b) Contact us (c) art.html (d) quiz.html -
33.⚖️ What colour is the text of this element?
<h2 class="menu" id="end">Hi</h2>
CSS:
.menu { color: green; }
#end { color: red; } (a) green (b) black (c) blue (d) red - 34.True or false: <th> makes a heading cell. (a) True (b) False
- 35.🎯 What kind of selector is img? (a) an element selector (b) an id selector (c) a class selector
- 36.Which of these does HTML do? (a) reacts to a button click (b) shows a pop-up message (c) rounds box corners (d) makes headings and lists
- 37.📄 Which part holds everything you see on the page? (a) the title (b) the head (c) the body (d) the doctype
- 38.⚡ Where does console.log() show its output? (a) on the title bar (b) on the printer (c) in the console (d) in the address bar
- 39.True or false: <h1> goes in the body. (a) False (b) True
-
40.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>Rain today</p>
<!-- <p>The red kite</p> -->
Answer key
- Easy snacks
- 51
- <aside>
- <header>
- 16
- 3
- Hello, world!
- 5
- False
- Well done, Zoya!
- color
- JavaScript
- <nav>
- text
- takes only numbers
- 7
- 102
- <!DOCTYPE html>
- .
- <h4>
- <script src="script.js">
- Yes
- 400
- </body>
- Pass
- <h1>
- href
- blue
- Mango#Kite29!
- think before you post
- 3
- art.html
- red
- True
- an element selector
- makes headings and lists
- the body
- in the console
- True
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids