← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 655 · 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 many times does this code print “Welcome”?
    for (let i = 3; i <= 8; i++) {
      console.log("Welcome");
    }
  2. 2.⚡ What does this code print? (Look at the quotes!)
    let x = "4";
    let y = 7;
    console.log(x + y);
    (a) Error (b) 11 (c) 47
  3. 3.✍️ Which property is set to yellow in this rule?
    .box {
      color: red;
      margin: 10px;
      background-color: yellow;
    }
    (a) padding (b) background-color (c) yellow (d) margin
  4. 4.🌍 Which one asks for a web page? (a) the server (b) the URL (c) HTTPS (d) the browser
  5. 5.⚖️ What colour is the text of this element?
    <h2 class="note" id="intro">Hi</h2>
    CSS:
    #intro { color: green; }
    #intro { color: yellow; }
    (a) black (b) orange (c) yellow (d) green
  6. 6.True or false: CSS changes the page live. (a) True (b) False
  7. 7.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
  8. 8.What does justify-content: flex-end do? (a) packs boxes at the start (b) puts boxes in the middle (c) packs boxes at the end (d) equal gaps, none at ends
  9. 9.⚡ What does this code print? (Look at the quotes!)
    let x = "6";
    let y = 9;
    console.log(x + y);
    (a) 15 (b) 69 (c) Error
  10. 10.🔢 On a typical page, from top to bottom, which comes first: “<header>” or “<main>”? (a) <main> (b) <header>
  11. 11.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 26px;
      }
    }
  12. 12.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  13. 13.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 480px;
      justify-content: center;
    }
    Inside are 4 boxes, each 80px wide (no margins).
  14. 14.🔍 Which is the odd one out? (a) makes a form box (b) rounds box corners (c) makes headings and lists (d) gives the page structure
  15. 15.📊 Which tag makes one data cell? (a) <th> (b) <table> (c) <caption> (d) <td>
  16. 16.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h6>? (a) <h4> (b) <h2> (c) <h6> (d) <h1>
  17. 17.🔗 Which address opens when you click this link?
    <a href="art.html">Visit the site</a>
    (a) quiz.html (b) news.html (c) art.html (d) Visit the site
  18. 18.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Jamun</li>
    </ul>
  19. 19.🎯 Which element does the selector .menu style? (a) <p class="menu"> (b) <h1 class="big"> (c) <p id="menu"> (d) <p class="note">
  20. 20.⚡ Which JavaScript word writes in the console? (a) for (b) if (c) let (d) console.log()
  21. 21.🌈 Which colour of light is strongest in rgb(34, 191, 15)? (a) green (b) red (c) blue
  22. 22.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>My pets</p>
    <h2>Fun facts</h2>
    <p>My best friend</p>
    <h2>Hello, world!</h2>
    <h2>Fun facts</h2>
  23. 23.🖌️ Which CSS property centres a heading? (a) color (b) text-align (c) font-family (d) background-color
  24. 24.🧭 Which semantic tag holds copyright notes? (a) <header> (b) <footer> (c) <nav> (d) <main>
  25. 25.True or false: HTML on its own cannot make headings. (a) False (b) True
  26. 26.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
  27. 27.🖌️ What colour are the letters?
    h1 {
      color: yellow;
      background-color: white;
      text-align: center;
      font-size: 20px;
    }
    (a) white (b) yellow (c) blue
  28. 28.🛡️ Online: is it safe to keep passwords secret? (a) not safe (b) safe
  29. 29.True or false: <main> holds the logo and title. (a) False (b) True
  30. 30.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="350">
    (a) fort.jpg (b) A tiger asleep (c) width (d) An old fort
  31. 31.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) editor (c) attribute (d) element
  32. 32.⚡ Which word makes a new variable? (a) make (b) put (c) give (d) let
  33. 33.🧭 Is <span> semantic or not semantic? (a) semantic (b) not semantic
  34. 34.🎯 Which CSS selector matches this element?
    <h1 class="red" id="hero">Hello</h1>
    (a) .hero (b) #red (c) h2 (d) h1
  35. 35.📱 The screen is 820px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 22px;
      }
    }
    (a) Yes (b) No
  36. 36.True or false: <td> makes a heading cell. (a) False (b) True
  37. 37.✍️ How many declarations (property: value pairs) are in this rule?
    p {
      color: red;
      text-align: center;
      font-style: italic;
      width: 300px;
    }
  38. 38.🎨 Which tag connects an outside CSS file? (a) <css> (b) <a> (c) <img> (d) <link>
  39. 39.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
  40. 40.🧭 How many <main> parts should a page have? (a) one (b) three (c) none (d) ten

Answer key

  1. 6
  2. 47
  3. background-color
  4. the browser
  5. yellow
  6. False
  7. red
  8. packs boxes at the end
  9. 69
  10. <header>
  11. 26
  12. in a new tab
  13. 80
  14. rounds box corners
  15. <td>
  16. <h1>
  17. art.html
  18. 2
  19. <p class="menu">
  20. console.log()
  21. green
  22. 3
  23. text-align
  24. <footer>
  25. False
  26. 2
  27. yellow
  28. safe
  29. False
  30. An old fort
  31. element
  32. let
  33. not semantic
  34. h1
  35. No
  36. False
  37. 4
  38. <link>
  39. <a>
  40. one

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