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.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the later one (c) the first one (d) the shorter one
-
2.⚖️ What colour is the text of this element?
<p class="star" id="logo">Hi</p>
CSS:
.star { color: black; }
p { color: red; } (a) black (b) red (c) yellow (d) orange - 3.True or false: to type a password on http is not safe. (a) False (b) True
-
4.🌍 What is the protocol in this URL?
https://kids.example.org/news/today.html (a) /news/today.html (b) http (c) kids.example.org (d) https -
5.🔗 Which words do you click on?
<a href="contact.html">About us</a> (a) href (b) Contact us (c) About us (d) contact.html -
6.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 130px;
padding: 20px;
border: 4px solid black;
margin: 5px;
} -
7.⚖️ What colour is the text of this element?
<p class="big" id="intro">Hi</p>
CSS:
p { color: yellow; }
#intro { color: orange; }
.big { color: blue; } (a) orange (b) yellow (c) blue (d) green - 8.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
- 9.True or false: in <img>, width names the picture file. (a) False (b) True
- 10.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
11.🔗 Which address opens when you click this link?
<a href="quiz.html">Art corner</a> (a) games.html (b) quiz.html (c) Art corner (d) about.html - 12.Which of these goes in the head? (a) <table> (b) <a> (c) <meta charset="utf-8"> (d) <h1>
- 13.🧭 Why use <nav> instead of <div> for a menu? (a) it makes text red (b) it adds pictures (c) it tells its meaning (d) it loads faster
- 14.🧭 Is <main> semantic or not semantic? (a) semantic (b) not semantic
- 15.💪 Which flexbox property lines boxes up across? (a) flex-direction (b) display: flex (c) align-items (d) justify-content
- 16.True or false: .note is an element selector. (a) True (b) False
- 17.Which of these has a closing tag? (a) <p> (b) <img> (c) <input> (d) <meta>
- 18.⚡ Which tag holds JavaScript in a page? (a) <js> (b) <script> (c) <code> (d) <style>
- 19.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </html> (c) <html> (d) <body>
- 20.🧭 Which semantic tag holds the logo and title? (a) <aside> (b) <nav> (c) <main> (d) <header>
- 21.⚡ A JavaScript file usually ends with which extension? (a) .css (b) .jpg (c) .html (d) .js
- 22.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) a comment (d) an attribute
- 23.True or false: <footer> holds extra side notes. (a) False (b) True
- 24.♿ Does this help everyone, or make the page harder to use: colour as the only clue? (a) makes it harder (b) helps everyone
-
25.📋 What number does the browser show next to “Mango”?
<ol start="4">
<li>Grapes</li>
<li>Mango</li>
<li>Guava</li>
<li>Orange</li>
<li>Papaya</li>
<li>Jamun</li>
</ol> - 26.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h3> or <h1>? (a) <h4> (b) <h5> (c) <h1> (d) <h3>
-
27.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="radio" name="sport"> Hockey
<input type="radio" name="sport"> Football
<input type="radio" name="sport"> Cricket
</form> - 28.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <br> (d) <h1>
- 29.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <li> (c) <ol>
- 30.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) blue (c) red (d) black
- 31.True or false: <tr> makes a heading cell. (a) False (b) True
- 32.🌗 Is white on black easy or hard to read? (a) easy to read (b) hard to read
-
33.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="200"> - 34.🌈 Which colour is #ffff00? (a) red (b) yellow (c) cyan (d) magenta
- 35.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <br> (c) <hr> (d) <ul>
- 36.🔢 On a typical page, from top to bottom, which comes first: “<main>” or “<footer>”? (a) <footer> (b) <main>
- 37.What does justify-content: flex-start do? (a) equal gaps, none at ends (b) packs boxes at the end (c) puts boxes in the middle (d) packs boxes at the start
- 38.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as one space (d) as a new line
- 39.What is <input type="radio"> for? (a) lets you pick only one (b) picks a day (c) hides what you type (d) is for one line of words
-
40.🔍 Which line is missing its closing tag?
line 1: <h1>Hello, world!
line 2: <strong>My best friend</strong>
line 3: <em>Cricket is fun.</em> (a) line 2 (b) line 3 (c) line 1
Answer key
- the later one
- black
- True
- https
- About us
- 178
- orange
- <a>
- False
- a closing tag
- quiz.html
- <meta charset="utf-8">
- it tells its meaning
- semantic
- align-items
- False
- <p>
- <script>
- <!DOCTYPE html>
- <header>
- .js
- an attribute
- False
- makes it harder
- 5
- <h5>
- 1
- <h1>
- <ol>
- black
- False
- easy to read
- 200
- yellow
- <ol>
- <main>
- packs boxes at the start
- as one space
- lets you pick only one
- line 1
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids