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 attribute of <img> describes the picture? (a) height (b) width (c) src (d) alt
- 2.🖼️ Which attribute of <img> names the picture file? (a) height (b) src (c) width (d) alt
-
3.🖌️ How big is the text, in px?
h1 {
text-align: center;
background-color: orange;
color: yellow;
font-size: 28px;
} -
4.🔍 Which line is missing its closing tag?
line 1: <u>Our school trip</u>
line 2: <p>Cricket is fun.</p>
line 3: <h1>The red kite (a) line 2 (b) line 3 (c) line 1 -
5.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Rivers flow<br>Stars shine<br>Roses are red<br>Kites fly high</p> -
6.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (max-width: 768px) {
p {
font-size: 14px;
}
} - 7.Which of these is true of a code editor? (a) answers page requests (b) has an address bar (c) shows line numbers (d) shows pages from the web
- 8.🧭 Is <section> semantic or not semantic? (a) not semantic (b) semantic
- 9.What does font-weight do? (a) picks the font style (b) colours behind the text (c) makes the text bold (d) centres a heading
- 10.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) <body>
- 11.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h5> or <h2>? (a) <h3> (b) <h5> (c) <h1> (d) <h2>
- 12.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h6> or <h1>? (a) <h4> (b) <h1> (c) <h2> (d) <h6>
- 13.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
-
14.⚡ What number does this code print?
let a = 17;
let b = 20;
console.log(a + b); - 15.💪 Which justify-content value packs boxes at the start? (a) flex-start (b) center (c) flex-end (d) space-between
-
16.🖌️ What colour is behind the letters?
li {
text-align: left;
color: orange;
font-size: 16px;
background-color: yellow;
} (a) red (b) orange (c) yellow - 17.🌈 In #130000 the red part is the hex number 13. What is it as a normal number?
- 18.Which of these goes in the head? (a) <h1> (b) <ul> (c) <p> (d) <meta charset="utf-8">
- 19.🎯 What kind of selector is #top? (a) an id selector (b) a class selector (c) an element selector
-
20.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h2>I love mangoes.</h2>
<h4>Hello, world!</h4> - 21.🛡️ Online: is it safe to download from pop-ups? (a) not safe (b) safe
-
22.🔁 What is the LAST number this code prints?
for (let i = 0; i < 9; i = i + 4) {
console.log(i);
} - 23.🔐 Is Blue@Tiger_74 a strong or a weak password? (a) strong (b) weak
-
24.🔁 How many times does this code print “Hello”?
for (let i = 1; i < 4; i++) {
console.log("Hello");
} - 25.⚖️ Which selector is the strongest? (a) an id selector (b) a class selector (c) an element selector
- 26.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is a game (b) the site is fast (c) the site is free (d) the data is scrambled
- 27.True or false: .note is a class selector. (a) False (b) True
-
28.⚖️ What colour is the text of this element?
<h1 class="box" id="main">Hi</h1>
CSS:
#main { color: black; }
#main { color: red; } (a) red (b) black (c) orange (d) yellow - 29.🚀 Which file should this code go in: <h1>My Site</h1> (a) script.js (b) index.html (c) style.css
- 30.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
- 31.🌐 Which one is where we type code? (a) a web browser (b) a web server (c) a code editor
- 32.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h6>? (a) <h6> (b) <h2> (c) <h1> (d) <h3>
- 33.Which of these is a weak password? (a) Mango#Kite29! (b) Blue@Tiger_74 (c) 111111 (d) S0lar!Pen#8
- 34.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) neither (c) the later one (d) the first one
- 35.🔐 Is Kite_Fl1es@Dawn a strong or a weak password? (a) weak (b) strong
- 36.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
- 37.True or false: the content is space inside the border. (a) False (b) True
- 38.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h1> (d) <h6>
- 39.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
- 40.🔍 Which is the odd one out? (a) gives the page structure (b) shows a pop-up message (c) makes a link (d) makes headings and lists
Answer key
- alt
- src
- 28
- line 3
- 5
- 14
- shows line numbers
- semantic
- makes the text bold
- <!DOCTYPE html>
- <h5>
- <h6>
- <a>
- 37
- flex-start
- yellow
- 19
- <meta charset="utf-8">
- an id selector
- 3
- not safe
- 8
- strong
- 3
- an id selector
- the data is scrambled
- True
- red
- index.html
- <ul>
- a code editor
- <h6>
- 111111
- the later one
- strong
- href
- False
- <h1>
- <ol>
- shows a pop-up message
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids