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.⚖️ What colour is the text of this element?
<p class="box" id="hero">Hi</p>
CSS:
p { color: black; }
#hero { color: red; }
.box { color: orange; } (a) yellow (b) black (c) red (d) orange - 2.True or false: <input type="email"> lets you pick only one. (a) False (b) True
- 3.True or false: HTML reacts to a button click. (a) True (b) False
- 4.⚡ What does JavaScript add to a web page? (a) the page title (b) the domain name (c) actions and changes (d) only colours
-
5.📊 How many heading cells (<th>) does this table have?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
<tr><td>Grapes</td><td>Orange</td><td>Papaya</td><td>Litchi</td></tr>
<tr><td>Guava</td><td>Banana</td><td>Mango</td><td>Jamun</td></tr>
<tr><td>Jamun</td><td>Litchi</td><td>Grapes</td><td>Orange</td></tr>
</table> - 6.💪 Which flexbox property spaces boxes along a row? (a) justify-content (b) align-items (c) flex-direction (d) display: flex
-
7.🌍 What is the protocol in this URL?
https://www.example.net/news/today.html (a) /news/today.html (b) www.example.net (c) http (d) https - 8.True or false: <meta> has a closing tag. (a) True (b) False
- 9.⚡ A JavaScript file usually ends with which extension? (a) .html (b) .js (c) .jpg (d) .css
-
10.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>My best friend</p>
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p>
<p>Rain today</p> -
11.🔗 Which words do you click on?
<a href="art.html">Contact us</a> (a) href (b) Contact us (c) Visit the site (d) art.html -
12.🔗 Where does this link open?
<a href="quiz.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab -
13.⚡ What does this code show?
let name = "Riya";
console.log("Well done, " + name + "!"); (a) name (b) Well done, Riya! (c) Well done, name! (d) Riya - 14.📦 In the box model, which part is space inside the border? (a) margin (b) content (c) padding (d) border
- 15.🚀 Which file should this code go in: .box { padding: 8px; } (a) index.html (b) style.css (c) script.js
-
16.🔗 Which address opens when you click this link?
<a href="about.html">Take the quiz</a> (a) https://example.com (b) contact.html (c) Take the quiz (d) about.html - 17.True or false: HTML on its own cannot make links to pages. (a) True (b) False
-
18.🔗 Where does this link open?
<a href="quiz.html">Take the quiz</a> (a) in the same tab (b) in a new tab - 19.🔗 Which attribute holds the address of a link? (a) src (b) href (c) id (d) alt
-
20.🔁 What does this code print?
let score = 22;
if (score >= 32) {
console.log("You win");
} else {
console.log("Play again");
} (a) You win (b) Play again - 21.📋 Which list tag is one item of a list? (a) <li> (b) <ol> (c) <ul>
- 22.True or false: <input type="email"> is for one line of words. (a) False (b) True
-
23.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h4>Rain today</h4>
<p>My pets</p>
<h3>Cricket is fun.</h3> -
24.🔗 Where does this link open?
<a href="maths.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab -
25.🔁 How many times does this code print “Hi”?
for (let i = 1; i < 7; i++) {
console.log("Hi");
} - 26.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) [ (d) (
- 27.True or false: padding is the line round the box. (a) True (b) False
- 28.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
- 29.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to add colour (d) to leave notes
- 30.✍️ Which sign ends each CSS declaration? (a) ; (b) , (c) . (d) :
- 31.What is <input type="number"> for? (a) takes only numbers (b) picks a day (c) is for an email address (d) is for one line of words
-
32.🔗 Where does this link open?
<a href="maths.html" target="_blank">Art corner</a> (a) in a new tab (b) in the same tab - 33.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h6>? (a) <h3> (b) <h4> (c) <h2> (d) <h6>
-
34.🔁 How many times does this code print “Hello”?
for (let i = 1; i <= 3; i++) {
console.log("Hello");
} -
35.🔗 Which address opens when you click this link?
<a href="maths.html">Maths fun</a> (a) news.html (b) art.html (c) maths.html (d) Maths fun - 36.🧭 Why use <nav> instead of <div> for a menu? (a) it tells its meaning (b) it adds pictures (c) it makes text red (d) it loads faster
- 37.🌍 What does a web address (URL) tell the browser? (a) your password (b) the page colour (c) where the page is (d) how old you are
-
38.🖌️ Where does the text sit on its line?
h2 {
text-align: left;
background-color: yellow;
font-size: 20px;
color: blue;
} (a) on the left (b) on the right (c) in the middle - 39.♿ Does this help everyone, or make the page harder to use: use big enough text? (a) helps everyone (b) makes it harder
- 40.True or false: JavaScript rounds box corners. (a) True (b) False
Answer key
- red
- False
- False
- actions and changes
- 4
- justify-content
- https
- False
- .js
- 4
- Contact us
- in a new tab
- Well done, Riya!
- padding
- style.css
- about.html
- False
- in the same tab
- href
- Play again
- <li>
- False
- 3
- in a new tab
- 6
- <
- False
- Yes
- to leave notes
- ;
- takes only numbers
- in a new tab
- <h6>
- 3
- maths.html
- it tells its meaning
- where the page is
- on the left
- helps everyone
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids