← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 31 · 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.🔐 Is qwerty a strong or a weak password? (a) weak (b) strong
  2. 2.⚖️ What colour is the text of this element?
    <p class="star" id="top">Hi</p>
    CSS:
    #top { color: white; }
    #top { color: black; }
    (a) blue (b) red (c) black (d) white
  3. 3.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h5>? (a) <h1> (b) <h5> (c) <h2> (d) <h4>
  4. 4.🔢 When you open a web page, which comes first: “the server sends files” or “the browser shows it”? (a) the browser shows it (b) the server sends files
  5. 5.♿ Is this heading order correct (no level skipped)?
    <h1> → <h3> → <h3> → <h4>
    (a) No (b) Yes
  6. 6.📱 The screen is 1366px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 14px;
      }
    }
    (a) Yes (b) No
  7. 7.🎨 Which tag holds CSS inside the head? (a) <style> (b) <script> (c) <css> (d) <body>
  8. 8.True or false: .card is an id selector. (a) False (b) True
  9. 9.🔁 What does this code print?
    let marks = 4;
    if (marks >= 11) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Pass (b) Try again
  10. 10.📝 What does a password box show instead of letters? (a) dots (b) capital letters (c) numbers (d) emojis
  11. 11.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Easy snacks (b) index.html (c) Space Facts (d) Thanks for visiting.
  12. 12.🎯 Which CSS selector matches this element?
    <h2 class="red" id="top">Hello</h2>
    (a) .box (b) #top (c) #red (d) li
  13. 13.True or false: <p> goes in the head. (a) False (b) True
  14. 14.♿ A part of the page is under a <h1> heading. Which tag should its sub-heading use? (a) <h2> (b) <h6> (c) <h4> (d) <h1>
  15. 15.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 6; i++) {
      total = total + i;
    }
    console.log(total);
  16. 16.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <li> (d) <p>
  17. 17.🔢 On a typical page, from top to bottom, which comes FIRST? (a) <footer> (b) <nav> (c) <main> (d) <header>
  18. 18.True or false: <h1> goes in the body. (a) True (b) False
  19. 19.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    <p>Rain today</p>
    <p>The red kite</p>
    (a) Our school trip (b) Rain today (c) The red kite (d) My pets
  20. 20.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to show pictures (d) to leave notes
  21. 21.♿ Does this help everyone, or make the page harder to use: tiny grey text? (a) helps everyone (b) makes it harder
  22. 22.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h2> or <h1>? (a) <h2> (b) <h5> (c) <h1> (d) <h4>
  23. 23.🎯 What kind of selector is body? (a) a class selector (b) an element selector (c) an id selector
  24. 24.💬 Does the browser show comments on the page? (a) Yes (b) No
  25. 25.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ul>
    (a) numbers (b) bullets
  26. 26.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Grapes</td><td>Papaya</td><td>Papaya</td></tr>
      <tr><td>Jamun</td><td>Guava</td><td>Grapes</td></tr>
    </table>
  27. 27.🎯 Which element does the selector #intro style? (a) <p class="intro"> (b) <p id="intro"> (c) <h1 class="note"> (d) <p id="main">
  28. 28.🌍 Which one stores the site’s files? (a) the URL (b) the browser (c) the server (d) HTTPS
  29. 29.🔍 One closing tag is missing. Which one?
    <h2>My pets</h2>
    <strong>Our school trip
    <b>My best friend</b>
    (a) </h2> (b) </b> (c) </strong> (d) </h1>
  30. 30.📊 Where do <td> cells go? (a) inside the <head> (b) inside a <li> (c) inside a <tr> (d) inside a <p>
  31. 31.Which of these is a strong password? (a) Rain#Drop_42! (b) 123456 (c) 111111 (d) abcd1234
  32. 32.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="sport"> Kabaddi
      <input type="radio" name="sport"> Cricket
      <input type="radio" name="sport"> Football
      <input type="radio" name="sport"> Chess
      <input type="radio" name="sport"> Hockey
    </form>
  33. 33.True or false: <br> is an empty tag. (a) True (b) False
  34. 34.🌗 Is black on white easy or hard to read? (a) easy to read (b) hard to read
  35. 35.📦 In the box model, which part is space outside the border? (a) padding (b) border (c) content (d) margin
  36. 36.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */
  37. 37.True or false: to use a strong password is not safe. (a) True (b) False
  38. 38.✍️ What is the selector in this CSS rule?
    #top {
      padding: 8px;
      background-color: yellow;
    }
    (a) padding (b) li (c) yellow (d) #top
  39. 39.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  40. 40.Which of these is not safe to do online? (a) keep passwords secret (b) use a nickname in games (c) use a strong password (d) click prize links

Answer key

  1. weak
  2. black
  3. <h1>
  4. the server sends files
  5. No
  6. No
  7. <style>
  8. False
  9. Try again
  10. dots
  11. Space Facts
  12. #top
  13. False
  14. <h2>
  15. 21
  16. <li>
  17. <header>
  18. True
  19. Our school trip
  20. to leave notes
  21. makes it harder
  22. <h5>
  23. an element selector
  24. No
  25. bullets
  26. 3
  27. <p id="intro">
  28. the server
  29. </strong>
  30. inside a <tr>
  31. Rain#Drop_42!
  32. 1
  33. True
  34. easy to read
  35. margin
  36. -->
  37. False
  38. #top
  39. a closing tag
  40. click prize links

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