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 of these is true of a web server? (a) opens web pages for us (b) stores a website’s files (c) is where we type code (d) shows line numbers
- 2.💪 Which justify-content value equal gaps, none at ends? (a) center (b) flex-start (c) space-between (d) flex-end
-
3.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 240px;
justify-content: center;
}
Inside are 4 boxes, each 50px wide (no margins). - 4.📊 Which tag gives the table a title? (a) <caption> (b) <th> (c) <td> (d) <table>
- 5.✍️ Which sign ends each CSS declaration? (a) : (b) , (c) ; (d) .
- 6.Which of these is a closing tag? (a) <body> (b) </b> (c) <b> (d) <li>
- 7.🚀 Which file should this code go in: body { margin: 0; } (a) index.html (b) style.css (c) script.js
- 8.♿ A part of the page is under a <h5> heading. Which tag should its sub-heading use? (a) <h5> (b) <h1> (c) <h2> (d) <h6>
- 9.⚖️ Which selector is the weakest? (a) an id selector (b) a class selector (c) an element selector
-
10.⚖️ What colour is the text of this element?
<h1 class="red" id="hero">Hi</h1>
CSS:
h1 { color: orange; }
h1 { color: yellow; } (a) purple (b) blue (c) yellow (d) orange - 11.True or false: h1 is a class selector. (a) True (b) False
- 12.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
13.♿ Is this heading order correct (no level skipped)?
<h1> → <h2> → <h3> → <h4> (a) Yes (b) No - 14.🔠 Which tag is the least important heading? (a) <h1> (b) <h6> (c) <h3> (d) <p>
- 15.True or false: <input type="checkbox"> lets you tick many. (a) True (b) False
-
16.✍️ What value is given to font-style in this rule?
body {
color: red;
font-style: italic;
} (a) italic (b) red (c) 20px (d) font-style - 17.🛡️ Online: is it safe to check for https first? (a) not safe (b) safe
- 18.🔁 Which word runs code only when something is true? (a) if (b) log (c) let (d) for
- 19.🔐 Is iloveyou a strong or a weak password? (a) weak (b) strong
-
20.🖌️ What colour are the letters?
p {
color: yellow;
background-color: purple;
text-align: center;
font-size: 12px;
} (a) yellow (b) purple (c) orange - 21.What does font-weight do? (a) picks the font style (b) makes the text bold (c) colours behind the text (d) sets the letter colour
- 22.⚡ What does alert() show? (a) a new tab (b) a table (c) a picture (d) a pop-up box
- 23.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an attribute (d) an element name
- 24.What is <input type="date"> for? (a) picks a day (b) is for an email address (c) lets you pick only one (d) lets you tick many
- 25.💬 How does an HTML comment start? (a) /* (b) <!-- (c) // (d) #
- 26.🎯 Which sign starts an id selector? (a) . (b) & (c) # (d) @
- 27.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 28.🧭 How many <main> parts should a page have? (a) ten (b) three (c) none (d) one
- 29.💪 Which justify-content value packs boxes at the end? (a) flex-start (b) center (c) flex-end (d) space-between
-
30.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="350"> - 31.True or false: console.log(5 + 2); goes in script.js. (a) True (b) False
- 32.🔁 What does i++ do? (a) takes 1 from i (b) prints i (c) adds 1 to i (d) doubles i
- 33.✍️ CSS declarations go inside which brackets? (a) ( ) (b) [ ] (c) { } (d) < >
- 34.🌈 Which colour is #00ff00? (a) bright green (b) white (c) cyan (d) blue
- 35.True or false: <h1>My Site</h1> goes in script.js. (a) True (b) False
- 36.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Markup (c) Modern (d) Mouse
- 37.📱 Which tag helps phones show a page at the right size? (a) the br tag (b) the title tag (c) the viewport meta tag (d) the hr tag
- 38.🌐 Which one sends pages over the net? (a) a code editor (b) a web browser (c) a web server
-
39.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (max-width: 600px) {
p {
font-size: 10px;
}
} - 40.📄 Can HTML on its own pick a random number? (a) No (b) Yes
Answer key
- stores a website’s files
- space-between
- 20
- <caption>
- ;
- </b>
- style.css
- <h6>
- an element selector
- yellow
- False
- an empty tag
- Yes
- <h6>
- True
- italic
- safe
- if
- weak
- yellow
- makes the text bold
- a pop-up box
- an attribute
- picks a day
- <!--
- #
- Yes
- one
- flex-end
- 350
- True
- adds 1 to i
- { }
- bright green
- False
- Markup
- the viewport meta tag
- a web server
- 12
- No
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids