← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 739 · 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 yellow on white easy or hard to read? (a) easy to read (b) hard to read
  2. 2.💪 Which flexbox property sets space between boxes? (a) align-items (b) gap (c) flex-direction (d) justify-content
  3. 3.Which of these does HTML do? (a) lays out the page (b) changes the page live (c) makes headings and lists (d) counts down a timer
  4. 4.True or false: <main> holds a news story. (a) False (b) True
  5. 5.📱 The screen is 820px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 14px;
      }
    }
    (a) Yes (b) No
  6. 6.Which of these has a closing tag? (a) <meta> (b) <p> (c) <br> (d) <img>
  7. 7.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) blue (c) yellow (d) red
  8. 8.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Art Gallery (b) All about me (c) Try this poha. (d) index.html
  9. 9.True or false: #top is an id selector. (a) False (b) True
  10. 10.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
  11. 11.True or false: HTML on its own can pick a random number. (a) False (b) True
  12. 12.💬 How does an HTML comment start? (a) <!-- (b) // (c) # (d) /*
  13. 13.True or false: to use a strong password is safe. (a) False (b) True
  14. 14.✍️ How many declarations (property: value pairs) are in this rule?
    h2 {
      background-color: yellow;
    }
  15. 15.✍️ Which property is set to bold in this rule?
    h1 {
      margin: 10px;
      font-weight: bold;
    }
    (a) border (b) font-weight (c) width (d) bold
  16. 16.True or false: <ul> shows bullet points. (a) False (b) True
  17. 17.⚡ What does this code print? (Look at the quotes!)
    let x = "1";
    let y = 3;
    console.log(x + y);
    (a) Error (b) 4 (c) 13
  18. 18.📱 The screen is 1366px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 6px;
      }
    }
    (a) No (b) Yes
  19. 19.🌈 In #8d0000 the red part is the hex number 8d. What is it as a normal number?
  20. 20.🧭 How many <main> parts should a page have? (a) one (b) ten (c) none (d) three
  21. 21.🔁 What does this code print?
    let marks = 45;
    if (marks < 40) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Try again (b) Pass
  22. 22.🧩 Which language puts a picture on a page? (a) CSS (b) JavaScript (c) HTML
  23. 23.🌈 Which hex code is blue? (a) #00ff00 (b) #0000ff (c) #ff0000 (d) #ff00ff
  24. 24.🎯 Which CSS selector matches this element?
    <h1 class="note" id="intro">Hello</h1>
    (a) h2 (b) .note (c) #main (d) .big
  25. 25.Which of these is a strong password? (a) qwerty (b) password (c) riya2014 (d) S0lar!Pen#8
  26. 26.True or false: “use headings in order” helps everyone use the page. (a) True (b) False
  27. 27.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 14px;
      }
    }
  28. 28.🧭 Is <footer> semantic or not semantic? (a) semantic (b) not semantic
  29. 29.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="colour"> Pink
      <input type="checkbox" name="colour"> Blue
      <input type="checkbox" name="colour"> Orange
      <input type="checkbox" name="colour"> Red
      <input type="checkbox" name="colour"> Green
    </form>
  30. 30.🔁 How many times does this code print “Well done”?
    for (let i = 3; i < 6; i++) {
      console.log("Well done");
    }
  31. 31.Which of these is safe to do online? (a) meet an online stranger (b) share your password (c) keep passwords secret (d) type a password on http
  32. 32.🔍 Which is the odd one out? (a) is where we type code (b) hosts websites online (c) stores a website’s files (d) sends pages over the net
  33. 33.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 5; i = i + 3) {
      console.log(i);
    }
  34. 34.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine</p>
  35. 35.🖌️ How big is the text, in px?
    h2 {
      background-color: green;
      font-size: 20px;
      color: black;
      text-align: center;
    }
  36. 36.🧩 Which language sets colours and fonts? (a) HTML (b) JavaScript (c) CSS
  37. 37.📊 How many cells does this table have in all?
    <table>
      <tr><td>Jamun</td><td>Jamun</td></tr>
      <tr><td>Guava</td><td>Jamun</td></tr>
    </table>
  38. 38.💪 Which justify-content value packs boxes at the start? (a) space-between (b) flex-start (c) center (d) flex-end
  39. 39.🌍 What is the protocol in this URL?
    https://school.example.in/maths/tables.html
    (a) school.example.in (b) https (c) http (d) /maths/tables.html
  40. 40.✍️ What value is given to border in this rule?
    p {
      background-color: yellow;
      font-weight: bold;
      border: 2px solid;
    }
    (a) 2px solid (b) border (c) italic (d) 300px

Answer key

  1. hard to read
  2. gap
  3. makes headings and lists
  4. False
  5. No
  6. <p>
  7. red
  8. Art Gallery
  9. True
  10. 2
  11. False
  12. <!--
  13. True
  14. 1
  15. font-weight
  16. True
  17. 13
  18. No
  19. 141
  20. one
  21. Try again
  22. HTML
  23. #0000ff
  24. .note
  25. S0lar!Pen#8
  26. True
  27. 14
  28. semantic
  29. 5
  30. 3
  31. keep passwords secret
  32. is where we type code
  33. 3
  34. 2
  35. 20
  36. CSS
  37. 4
  38. flex-start
  39. https
  40. 2px solid

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