← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 775 · 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.✍️ How does a CSS comment start? (a) # (b) /* (c) <!-- (d) //
  2. 2.True or false: <img> has a closing tag. (a) False (b) True
  3. 3.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
    <p>Hello, world!</p>
    <!-- <p>Good morning!</p> -->
  4. 4.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 8; i++) {
      total = total + 5;
    }
    console.log(total);
  5. 5.🔗 Which words do you click on?
    <a href="contact.html">About us</a>
    (a) contact.html (b) Contact us (c) href (d) About us
  6. 6.Which of these is true of <nav>? (a) helps you move around (b) holds extra side notes (c) sits at the bottom (d) is the page’s key part
  7. 7.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Kites fly high<br>Rivers flow</p>
  8. 8.🛡️ Should you share your password with your best friend? (a) Yes (b) No
  9. 9.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h3> or <h4>? (a) <h3> (b) <h6> (c) <h4> (d) <h5>
  10. 10.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
  11. 11.True or false: HTML on its own can make links to pages. (a) False (b) True
  12. 12.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 3; i++) {
      total = total + i;
    }
    console.log(total);
  13. 13.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="sport"> Football
      <input type="checkbox" name="sport"> Kabaddi
      <input type="checkbox" name="sport"> Cricket
      <input type="checkbox" name="sport"> Hockey
    </form>
  14. 14.🔍 Which line is missing its closing tag?
    line 1: <h2>Hello, world!
    line 2: <strong>Rain today</strong>
    line 3: <i>The red kite</i>
    (a) line 2 (b) line 3 (c) line 1
  15. 15.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 18px;
      }
    }
  16. 16.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 160px;
      justify-content: flex-start;
    }
    Inside are 3 boxes, each 50px wide (no margins).
  17. 17.🔢 To build and share your first web page, which comes LAST? (a) write the HTML (b) test in a browser (c) publish it online (d) plan what to show
  18. 18.🎯 Which CSS selector matches this element?
    <li class="big" id="top">Hello</li>
    (a) #big (b) #intro (c) .top (d) #top
  19. 19.🎯 Which element does the selector .red style? (a) <p class="red"> (b) <p class="box"> (c) <h1 class="star"> (d) <p id="red">
  20. 20.♿ A part of the page is under a <h1> heading. Which tag should its sub-heading use? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
  21. 21.True or false: JavaScript makes headings and lists. (a) True (b) False
  22. 22.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 270px;
      padding: 30px;
      border: 3px solid black;
      margin: 0px;
    }
  23. 23.⚡ What does this code show?
    let name = "Meera";
    console.log("Hello, " + name + "!");
    (a) Hello, name! (b) Hello, Meera! (c) name (d) Meera
  24. 24.🏷️ Which is the closing tag for <p>? (a) <p> (b) </p> (c) <p/> (d) <\p>
  25. 25.⚡ Which word makes a new variable? (a) make (b) give (c) put (d) let
  26. 26.Which of these is an opening tag? (a) <li> (b) </body> (c) </b> (d) </title>
  27. 27.⚡ What number does this code print?
    let a = 40;
    let b = 40;
    console.log(a - b);
  28. 28.⚡ What does this code print? (Look at the quotes!)
    let x = "6";
    let y = 5;
    console.log(x + y);
    (a) 11 (b) Error (c) 65
  29. 29.⚡ Which JavaScript word runs code when true? (a) for (b) alert() (c) if (d) let
  30. 30.Which of these is safe to do online? (a) use a nickname in games (b) download from pop-ups (c) click prize links (d) share your OTP
  31. 31.Which of these is not safe to do online? (a) share your password (b) ask before downloading (c) keep passwords secret (d) check for https first
  32. 32.📱 The screen is 540px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 14px;
      }
    }
    (a) Yes (b) No
  33. 33.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) element (d) address
  34. 34.🖌️ What colour is behind the letters?
    li {
      font-size: 28px;
      background-color: white;
      color: black;
      text-align: left;
    }
    (a) black (b) green (c) white
  35. 35.Which colour pair is hard to read? (a) light grey on white (b) dark grey on white (c) yellow on black (d) black on white
  36. 36.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 370px;
      justify-content: flex-start;
    }
    Inside are 4 boxes, each 80px wide (no margins).
  37. 37.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ul>
  38. 38.Which of these is margin? (a) the gap to other boxes (b) the text or picture (c) space inside the border (d) the line round the box
  39. 39.True or false: <title> has a closing tag. (a) False (b) True
  40. 40.Which of these is a strong password? (a) riya2014 (b) 123456 (c) password (d) Mango#Kite29!

Answer key

  1. /*
  2. False
  3. 2
  4. 40
  5. About us
  6. helps you move around
  7. 3
  8. No
  9. <h6>
  10. a web server
  11. True
  12. 6
  13. 4
  14. line 1
  15. 24
  16. 10
  17. publish it online
  18. #top
  19. <p class="red">
  20. <h2>
  21. False
  22. 336
  23. Hello, Meera!
  24. </p>
  25. let
  26. <li>
  27. 0
  28. 65
  29. if
  30. use a nickname in games
  31. share your password
  32. Yes
  33. element
  34. white
  35. light grey on white
  36. 50
  37. 3
  38. the gap to other boxes
  39. True
  40. Mango#Kite29!

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