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.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue</p> -
2.🔗 Which address opens when you click this link?
<a href="games.html">Contact us</a> (a) about.html (b) games.html (c) contact.html (d) Contact us -
3.⚡ What does this code show?
let name = "Meera";
console.log("Hello, " + name + "!"); (a) Hello, Meera! (b) Meera (c) Hello, name! (d) name - 4.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to show pictures (d) to leave notes
- 5.Which of these is safe to do online? (a) share your password (b) post your home address (c) check for https first (d) type a password on http
-
6.⚡ What number does this code print?
let score = 8;
score = score + 12;
score = score - 6;
console.log(score); - 7.True or false: <li> has a closing tag. (a) False (b) True
- 8.🔐 Is Mango#Kite29! a strong or a weak password? (a) strong (b) weak
-
9.🎯 Which CSS selector matches this element?
<h1 class="star" id="logo">Hello</h1> (a) #star (b) #end (c) .logo (d) #logo - 10.True or false: <style> goes in the body. (a) True (b) False
- 11.Which of these is true of <header>? (a) holds the main content (b) sits at the very top (c) sits at the bottom (d) holds the menu of links
-
12.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h2>I love mangoes.</h2>
<h3>Hello, world!</h3>
<h3>I love mangoes.</h3>
<p>My best friend</p> -
13.🔁 What does this code print?
let score = 40;
if (score < 20) {
console.log("You win");
} else {
console.log("Play again");
} (a) You win (b) Play again - 14.📦 In the box model, which part is space outside the border? (a) padding (b) border (c) margin (d) content
- 15.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <!DOCTYPE html> (d) <html>
- 16.🎨 Which tag holds CSS inside the head? (a) <style> (b) <body> (c) <css> (d) <script>
-
17.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> - 18.🌈 Which colour of light is strongest in rgb(203, 133, 75)? (a) red (b) green (c) blue
- 19.🧩 Which language sets colours and fonts? (a) HTML (b) JavaScript (c) CSS
- 20.🌐 Which one colours code to help us? (a) a web server (b) a code editor (c) a web browser
- 21.♿ A part of the page is under a <h2> heading. Which tag should its sub-heading use? (a) <h4> (b) <h1> (c) <h3> (d) <h2>
-
22.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>The red kite</p>
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<p>I love mangoes.</p>
<p>Hello, world!</p> - 23.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
- 24.True or false: to use a strong password is not safe. (a) True (b) False
- 25.🚀 Where in index.html does the link to style.css go? (a) after </html> (b) in the head (c) in the footer (d) inside a <p>
- 26.⚡ Which JavaScript word repeats code? (a) console.log() (b) if (c) for (d) alert()
- 27.📱 What does a media query check? (a) the screen width (b) the time of day (c) the page title (d) the battery level
- 28.🎯 Which sign starts an id selector? (a) @ (b) & (c) # (d) .
-
29.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Match report</h1>
<p>I like to read.</p>
</body>
</html> (a) Cricket Club (b) body (c) Match report (d) I like to read. - 30.True or false: <li> is an ordered list. (a) True (b) False
- 31.📝 What does a password box show instead of letters? (a) emojis (b) numbers (c) dots (d) capital letters
- 32.True or false: <a href="a.html">Go</a> goes in index.html. (a) False (b) True
- 33.⚖️ Which selector is the weakest? (a) an element selector (b) a class selector (c) an id selector
- 34.What does justify-content: flex-start do? (a) puts boxes in the middle (b) packs boxes at the start (c) equal gaps, none at ends (d) packs boxes at the end
- 35.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 36.True or false: the content is the text or picture. (a) True (b) False
-
37.🔗 Which words do you click on?
<a href="about.html">School news</a> (a) School news (b) about.html (c) Take the quiz (d) href -
38.🔗 Where does this link open?
<a href="maths.html" target="_blank">Visit the site</a> (a) in the same tab (b) in a new tab - 39.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h4> or <h6>? (a) <h6> (b) <h1> (c) <h4> (d) <h3>
- 40.🌈 Which colour is #0000ff? (a) white (b) red (c) blue (d) black
Answer key
- 2
- games.html
- Hello, Meera!
- to leave notes
- check for https first
- 14
- True
- strong
- #logo
- False
- sits at the very top
- 4
- Play again
- margin
- <!DOCTYPE html>
- <style>
- 250
- red
- CSS
- a code editor
- <h3>
- 6
- in the body
- False
- in the head
- for
- the screen width
- #
- Match report
- False
- dots
- True
- an element selector
- packs boxes at the start
- a closing tag
- True
- School news
- in a new tab
- <h6>
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids