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.♿ Is this heading order correct (no level skipped)?
<h1> → <h2> → <h4> → <h5> (a) No (b) Yes - 2.Which of these is padding? (a) space inside the border (b) the gap to other boxes (c) the text or picture (d) a solid or dotted edge
-
3.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p>
<p>Hello, world!</p> (a) Rain today (b) Hello, world! (c) Cricket is fun. - 4.True or false: in <img>, width names the picture file. (a) False (b) True
-
5.✍️ How many declarations (property: value pairs) are in this rule?
.note {
font-style: italic;
} - 6.True or false: “colour as the only clue” helps everyone use the page. (a) False (b) True
- 7.True or false: .box { padding: 8px; } goes in index.html. (a) False (b) True
- 8.What does font-size do? (a) centres a heading (b) sets the letter colour (c) makes the text bold (d) makes letters bigger
-
9.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Hello, world!</p>
<h2>Our school trip</h2>
<p>Rain today</p> - 10.⚡ Which JavaScript word shows a pop-up box? (a) console.log() (b) alert() (c) let (d) for
-
11.⚡ What number does this code print?
let a = 19;
let b = 29;
console.log(a + b); -
12.⚡ What number does this code print?
let marks = 9;
marks = marks + 15;
marks = marks - 21;
console.log(marks); - 13.♿ Does this help everyone, or make the page harder to use: colour as the only clue? (a) makes it harder (b) helps everyone
- 14.🧭 Is <div> semantic or not semantic? (a) not semantic (b) semantic
- 15.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h5>? (a) <h6> (b) <h1> (c) <h5> (d) <h2>
- 16.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h3> or <h1>? (a) <h5> (b) <h6> (c) <h1> (d) <h3>
- 17.💬 How does an HTML comment end? (a) // (b) */ (c) --> (d) >>
- 18.True or false: <p> goes in the head. (a) True (b) False
-
19.⚖️ What colour is the text of this element?
<p class="note" id="hero">Hi</p>
CSS:
p { color: purple; }
.note { color: red; } (a) yellow (b) red (c) purple (d) black - 20.True or false: .star is an id selector. (a) True (b) False
- 21.⚖️ Which selector is the strongest? (a) an id selector (b) an element selector (c) a class selector
-
22.⚡ What number does this code print?
let marks = 15;
marks = marks + 2;
marks = marks - 12;
console.log(marks); -
23.🔍 One closing tag is missing. Which one?
<i>Hello, world!
<strong>Rain today</strong>
<small>The red kite</small> (a) </h3> (b) </strong> (c) </i> (d) </small> -
24.⚡ What number does this code print?
let books = 11;
books = books + 5;
books = books - 2;
console.log(books); -
25.📊 How many cells are in each row?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
<tr><td>Mango</td><td>Jamun</td><td>Orange</td><td>Grapes</td></tr>
<tr><td>Litchi</td><td>Banana</td><td>Mango</td><td>Grapes</td></tr>
<tr><td>Litchi</td><td>Litchi</td><td>Grapes</td><td>Papaya</td></tr>
</table> - 26.What does text-align do? (a) centres a heading (b) makes letters bigger (c) sets the letter colour (d) picks the font style
- 27.🌍 Which program shows a web page to us? (a) a web browser (b) a music player (c) a paint program (d) a calculator
- 28.🌈 Which colour of light is strongest in rgb(67, 90, 218)? (a) green (b) red (c) blue
-
29.🔗 Where does this link open?
<a href="art.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab -
30.🔁 How many times does this code print “Hello”?
for (let i = 0; i < 2; i++) {
console.log("Hello");
} - 31.🛡️ Online: is it safe to log out on shared PCs? (a) safe (b) not safe
-
32.🔁 How many times does this code print “Hi”?
for (let i = 2; i < 8; i++) {
console.log("Hi");
} - 33.🌈 Which hex code is blue? (a) #00ffff (b) #000000 (c) #ff00ff (d) #0000ff
- 34.True or false: <li> has a closing tag. (a) True (b) False
- 35.Which of these is an empty tag? (a) <h1> (b) <title> (c) <input> (d) <ul>
- 36.🚀 Which file is best for code that reacts to clicks? (a) notes.txt (b) index.html (c) style.css (d) script.js
- 37.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
- 38.🔍 Which is the odd one out? (a) puts a picture on a page (b) counts down a timer (c) reacts to a button click (d) checks a quiz answer
- 39.🏷️ Which is the closing tag for <strong>? (a) </strong> (b) <strong> (c) <\strong> (d) <strong/>
- 40.📊 Which tag makes one data cell? (a) <th> (b) <table> (c) <td> (d) <tr>
Answer key
- No
- space inside the border
- Rain today
- False
- 1
- False
- False
- makes letters bigger
- 2
- alert()
- 48
- 3
- makes it harder
- not semantic
- <h1>
- <h6>
- -->
- False
- red
- False
- an id selector
- 5
- </i>
- 14
- 4
- centres a heading
- a web browser
- blue
- in a new tab
- 2
- safe
- 6
- #0000ff
- True
- <input>
- script.js
- Yes
- puts a picture on a page
- </strong>
- <td>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids