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 JavaScript word writes in the console? (a) alert() (b) if (c) let (d) console.log()
- 2.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ol> (d) <ul>
- 3.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
-
4.🔁 What does this code print?
let marks = 21;
if (marks > 5) {
console.log("Pass");
} else {
console.log("Try again");
} (a) Pass (b) Try again - 5.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) <strong> (c) <\strong> (d) </strong>
- 6.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h5> or <h4>? (a) <h4> (b) <h6> (c) <h3> (d) <h5>
-
7.✍️ Which property is set to center in this rule?
.note {
text-align: center;
border: 2px solid;
} (a) text-align (b) center (c) background-color (d) margin -
8.🔗 Where does this link open?
<a href="contact.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab - 9.Which of these is true of <main>? (a) sits at the bottom (b) holds a news story (c) holds the menu of links (d) is the page’s key part
-
10.🖌️ What colour are the letters?
h1 {
background-color: black;
font-size: 28px;
text-align: center;
color: blue;
} (a) white (b) black (c) blue -
11.🔁 How many numbers does this code print?
for (let i = 0; i < 12; i = i + 2) {
console.log(i);
} -
12.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Our school trip</p>
<h2>Hello, world!</h2>
<h2>Our school trip</h2>
<h2>Rain today</h2>
<h2>Hello, world!</h2> -
13.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> - 14.🔢 When you open a web page, which comes first: “you type the URL” or “the browser shows it”? (a) the browser shows it (b) you type the URL
- 15.🎯 What kind of selector is p? (a) an id selector (b) a class selector (c) an element selector
- 16.💬 Does the browser show comments on the page? (a) Yes (b) No
- 17.True or false: a web browser opens web pages for us. (a) True (b) False
- 18.Which of these does JavaScript do? (a) sets colours and fonts (b) makes headings and lists (c) makes a form box (d) counts down a timer
- 19.True or false: <li> is an empty tag. (a) False (b) True
- 20.True or false: HTML on its own cannot keep a high score. (a) True (b) False
- 21.🌐 Which one stores a website’s files? (a) a web server (b) a code editor (c) a web browser
- 22.📦 In the box model, which part is the text or picture? (a) padding (b) margin (c) border (d) content
- 23.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
- 24.Which of these has a closing tag? (a) <input> (b) <li> (c) <img> (d) <hr>
-
25.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="100"> (a) fort.jpg (b) kite.png (c) An old fort (d) tiger.jpg - 26.🧩 Which language adds space around boxes? (a) JavaScript (b) HTML (c) CSS
- 27.🌈 Which colour is #ffffff? (a) bright green (b) black (c) blue (d) white
- 28.🧭 Who is helped most by semantic tags? (a) only the printer (b) only the server (c) nobody (d) screen-reader users
-
29.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> (a) width (b) A tiger asleep (c) tiger.jpg (d) A red kite - 30.True or false: <ol> is one item of a list. (a) False (b) True
- 31.True or false: <nav> holds the logo and title. (a) True (b) False
- 32.📝 Which input type sends the form? (a) checkbox (b) submit (c) email (d) password
- 33.True or false: HTML rounds box corners. (a) True (b) False
-
34.⚖️ What colour is the text of this element?
<h2 class="note" id="end">Hi</h2>
CSS:
.note { color: green; }
.note { color: orange; } (a) green (b) red (c) orange (d) purple - 35.🧭 Is <main> semantic or not semantic? (a) semantic (b) not semantic
- 36.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to show pictures (d) to leave notes
- 37.🌈 Which colour is #ff0000? (a) bright green (b) white (c) red (d) yellow
- 38.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 39.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <h1> (d) <br>
- 40.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
Answer key
- console.log()
- <ol>
- on the browser tab
- Pass
- </strong>
- <h6>
- text-align
- in a new tab
- is the page’s key part
- blue
- 6
- 2
- 150
- you type the URL
- an element selector
- No
- True
- counts down a timer
- False
- True
- a web server
- content
- in the body
- <li>
- fort.jpg
- CSS
- white
- screen-reader users
- A tiger asleep
- False
- False
- submit
- False
- orange
- semantic
- to leave notes
- red
- an opening tag
- <h1>
- <li>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids