← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 424 · 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.🔢 When you open a web page, which comes first: “the server sends files” or “the browser asks it”? (a) the server sends files (b) the browser asks it
  2. 2.🔢 To build and share your first web page, what comes right after “plan what to show”? (a) write the HTML (b) test in a browser (c) publish it online (d) add CSS styles
  3. 3.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 10px;
      }
    }
  4. 4.🔁 How many times does this code print “Welcome”?
    for (let i = 1; i <= 6; i++) {
      console.log("Welcome");
    }
  5. 5.🔢 To build and share your first web page, what comes right after “add CSS styles”? (a) write the HTML (b) publish it online (c) plan what to show (d) test in a browser
  6. 6.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h3>? (a) <h2> (b) <h3> (c) <h1> (d) <h5>
  7. 7.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to make it bigger (d) to describe the image
  8. 8.🌗 Is white on dark blue easy or hard to read? (a) hard to read (b) easy to read
  9. 9.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) starts a new line (d) makes a list
  10. 10.🔁 Which loop repeats code a set number of times? (a) for (b) else (c) if (d) let
  11. 11.Which of these goes in the body? (a) <title> (b) <style> (c) <h1> (d) <link rel="stylesheet">
  12. 12.True or false: in <img>, width names the picture file. (a) True (b) False
  13. 13.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  14. 14.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 220px;
      justify-content: flex-start;
    }
    Inside are 2 boxes, each 80px wide (no margins).
  15. 15.True or false: HTTPS scrambles data on its way. (a) False (b) True
  16. 16.🏷️ Which is the closing tag for <u>? (a) <u> (b) <\u> (c) </u> (d) <u/>
  17. 17.⚡ Which tag holds JavaScript in a page? (a) <style> (b) <script> (c) <js> (d) <code>
  18. 18.🔁 What does i++ do? (a) takes 1 from i (b) doubles i (c) prints i (d) adds 1 to i
  19. 19.⚖️ What colour is the text of this element?
    <h1 class="big" id="main">Hi</h1>
    CSS:
    .big { color: orange; }
    #main { color: purple; }
    h1 { color: black; }
    (a) blue (b) purple (c) orange (d) black
  20. 20.🔢 To build and share your first web page, which comes first: “write the HTML” or “add CSS styles”? (a) write the HTML (b) add CSS styles
  21. 21.🔗 Where does this link open?
    <a href="quiz.html">Play games</a>
    (a) in the same tab (b) in a new tab
  22. 22.🔢 When you open a web page, which comes first: “the server sends files” or “DNS finds the server”? (a) DNS finds the server (b) the server sends files
  23. 23.📝 How many <input> tags are in this form?
    <form>
      <input type="email">
      <input type="number">
      <input type="submit" value="Send">
    </form>
  24. 24.🔍 One closing tag is missing. Which one?
    <b>Hello, world!
    <h3>My pets</h3>
    <h2>Our school trip</h2>
    (a) </b> (b) </small> (c) </h3> (d) </h2>
  25. 25.🔍 Which is the odd one out? (a) turns HTML into a page (b) shows pages from the web (c) has an address bar (d) shows line numbers
  26. 26.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 6; i = i + 4) {
      console.log(i);
    }
  27. 27.Which of these is a strong password? (a) password (b) Kite_Fl1es@Dawn (c) iloveyou (d) abcd1234
  28. 28.♿ A part of the page is under a <h5> heading. Which tag should its sub-heading use? (a) <h3> (b) <h1> (c) <h6> (d) <h2>
  29. 29.🖌️ Where does the text sit on its line?
    h2 {
      text-align: right;
      color: green;
      background-color: orange;
      font-size: 20px;
    }
    (a) on the right (b) in the middle (c) on the left
  30. 30.✍️ What is the selector in this CSS rule?
    .box {
      font-style: italic;
      width: 300px;
      padding: 8px;
    }
    (a) .box (b) h2 (c) font-style (d) 300px
  31. 31.🔗 Which address opens when you click this link?
    <a href="https://example.com">School news</a>
    (a) School news (b) https://example.com (c) art.html (d) maths.html
  32. 32.📄 Can HTML on its own make tables? (a) No (b) Yes
  33. 33.🔗 Where does this link open?
    <a href="quiz.html">About us</a>
    (a) in the same tab (b) in a new tab
  34. 34.🌈 Which hex code is cyan? (a) #0000ff (b) #00ff00 (c) #00ffff (d) #ff00ff
  35. 35.🔁 What does this code print?
    let marks = 29;
    if (marks >= 20) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Pass (b) Try again
  36. 36.🎨 One CSS file can style how many pages? (a) only one word (b) many pages (c) only one image (d) no pages
  37. 37.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a hash # (d) a slash /
  38. 38.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  39. 39.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) width (d) height
  40. 40.🔗 Which words do you click on?
    <a href="contact.html">About us</a>
    (a) href (b) contact.html (c) Contact us (d) About us

Answer key

  1. the browser asks it
  2. write the HTML
  3. 12
  4. 6
  5. test in a browser
  6. <h1>
  7. to describe the image
  8. easy to read
  9. starts a new line
  10. for
  11. <h1>
  12. False
  13. has a closing tag
  14. 60
  15. True
  16. </u>
  17. <script>
  18. adds 1 to i
  19. purple
  20. write the HTML
  21. in the same tab
  22. DNS finds the server
  23. 3
  24. </b>
  25. shows line numbers
  26. 4
  27. Kite_Fl1es@Dawn
  28. <h6>
  29. on the right
  30. .box
  31. https://example.com
  32. Yes
  33. in the same tab
  34. #00ffff
  35. Pass
  36. many pages
  37. a slash /
  38. True
  39. alt
  40. About us

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