← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 303 · 40 questions
TalentJR

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. 1.🖌️ What colour is behind the letters?
    p {
      background-color: white;
      text-align: right;
      font-size: 40px;
      color: black;
    }
    (a) white (b) black (c) purple
  2. 2.💬 Does the browser show comments on the page? (a) Yes (b) No
  3. 3.📱 The screen is 375px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 18px;
      }
    }
    (a) No (b) Yes
  4. 4.Which of these is the border? (a) the text or picture (b) the gap round content (c) the gap to other boxes (d) a solid or dotted edge
  5. 5.⚖️ What colour is the text of this element?
    <p class="note" id="top">Hi</p>
    CSS:
    p { color: yellow; }
    .note { color: blue; }
    #top { color: red; }
    (a) blue (b) black (c) yellow (d) red
  6. 6.📊 Which tag makes a heading cell? (a) <th> (b) <caption> (c) <tr> (d) <td>
  7. 7.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 120px;
      padding: 30px;
      border: 2px solid black;
      margin: 15px;
    }
  8. 8.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it bold (d) makes it blank
  9. 9.🚀 Which file should this code go in: h1 { font-size: 32px; } (a) script.js (b) index.html (c) style.css
  10. 10.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 170px;
      justify-content: center;
    }
    Inside are 3 boxes, each 50px wide (no margins).
  11. 11.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h4>? (a) <h3> (b) <h6> (c) <h4> (d) <h2>
  12. 12.🔁 Which word runs code only when something is true? (a) for (b) log (c) let (d) if
  13. 13.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is a game (b) the site is free (c) the data is scrambled (d) the site is fast
  14. 14.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
  15. 15.🎯 Which CSS selector matches this element?
    <span class="star" id="end">Hello</span>
    (a) #star (b) span (c) .end (d) p
  16. 16.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the later one (b) neither (c) the shorter one (d) the first one
  17. 17.Which of these goes in the head? (a) <img> (b) <style> (c) <h1> (d) <table>
  18. 18.🚀 Which file should this code go in: let score = 0; (a) index.html (b) style.css (c) script.js
  19. 19.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h6>? (a) <h4> (b) <h5> (c) <h1> (d) <h6>
  20. 20.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Rain today</p>
    <h3>My pets</h3>
  21. 21.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h2> or <h5>? (a) <h5> (b) <h3> (c) <h2> (d) <h1>
  22. 22.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Mango</td><td>Litchi</td><td>Jamun</td><td>Litchi</td></tr>
      <tr><td>Litchi</td><td>Mango</td><td>Banana</td><td>Orange</td></tr>
      <tr><td>Guava</td><td>Mango</td><td>Jamun</td><td>Grapes</td></tr>
    </table>
  23. 23.📝 Which tag makes a big box for many lines of text? (a) <textarea> (b) <input> (c) <br> (d) <p>
  24. 24.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
  25. 25.True or false: .big is a class selector. (a) False (b) True
  26. 26.🔍 Which is the odd one out? (a) gives the page structure (b) makes headings and lists (c) checks a quiz answer (d) puts a picture on a page
  27. 27.True or false: the server sends the page back. (a) False (b) True
  28. 28.🛡️ Is it safe to use the same password on every site? (a) Yes (b) No
  29. 29.🔗 Where does this link open?
    <a href="news.html">Play games</a>
    (a) in a new tab (b) in the same tab
  30. 30.📱 Responsive design means a page ___. (a) fits every screen (b) is only for laptops (c) never changes (d) has no pictures
  31. 31.🌈 Which colour of light is strongest in rgb(37, 247, 138)? (a) blue (b) green (c) red
  32. 32.True or false: a web server has an address bar. (a) False (b) True
  33. 33.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 50px;
      padding: 25px;
      border: 5px solid black;
      margin: 0px;
    }
  34. 34.📊 Which tag gives the table a title? (a) <table> (b) <th> (c) <td> (d) <caption>
  35. 35.What does justify-content: flex-end do? (a) equal gaps, none at ends (b) packs boxes at the start (c) puts boxes in the middle (d) packs boxes at the end
  36. 36.🎨 What does CSS stand for? (a) Colourful Site Styles (b) Computer Style Sheets (c) Cascading Style Sheets (d) Creative Sheet System
  37. 37.♿ Who uses a screen reader? (a) only robots (b) only coders (c) only teachers (d) people who are blind
  38. 38.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) editor (d) element
  39. 39.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <ul> (d) <hr>
  40. 40.✍️ What is the selector in this CSS rule?
    h1 {
      font-style: italic;
      border: 2px solid;
      text-align: center;
    }
    (a) p (b) h1 (c) 2px solid (d) font-style

Answer key

  1. white
  2. No
  3. No
  4. a solid or dotted edge
  5. red
  6. <th>
  7. 214
  8. opens it in a new tab
  9. style.css
  10. 10
  11. <h2>
  12. if
  13. the data is scrambled
  14. 3
  15. span
  16. the later one
  17. <style>
  18. script.js
  19. <h1>
  20. 2
  21. <h5>
  22. 16
  23. <textarea>
  24. 1
  25. True
  26. checks a quiz answer
  27. True
  28. No
  29. in the same tab
  30. fits every screen
  31. green
  32. False
  33. 110
  34. <caption>
  35. packs boxes at the end
  36. Cascading Style Sheets
  37. people who are blind
  38. element
  39. <ul>
  40. h1

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids