← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 956 · 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.✍️ Which property is set to 8px in this rule?
    li {
      padding: 8px;
      color: red;
      border: 2px solid;
    }
    (a) 8px (b) border (c) font-weight (d) padding
  2. 2.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
  3. 3.🔁 What does this code print?
    let age = 2;
    if (age < 11) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  4. 4.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Orange</li>
    </ul>
    (a) numbers (b) bullets
  5. 5.⚡ What number does this code print?
    let apples = 7;
    apples = apples + 6;
    apples = apples - 2;
    console.log(apples);
  6. 6.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) body (c) We won by 5 runs. (d) All about me
  7. 7.✍️ How does a CSS comment start? (a) // (b) <!-- (c) # (d) /*
  8. 8.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 500px;
      justify-content: space-between;
    }
    Inside are 4 boxes, each 80px wide (no margins).
  9. 9.✍️ How many declarations (property: value pairs) are in this rule?
    h2 {
      font-size: 20px;
    }
  10. 10.Which of these does HTML do? (a) counts down a timer (b) changes the page live (c) reacts to a button click (d) makes headings and lists
  11. 11.🎨 Which tag holds CSS inside the head? (a) <css> (b) <script> (c) <body> (d) <style>
  12. 12.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  13. 13.🛡️ Is it safe to use the same password on every site? (a) No (b) Yes
  14. 14.🧩 Which language gives the page structure? (a) JavaScript (b) CSS (c) HTML
  15. 15.Which of these is true of <footer>? (a) holds the logo and title (b) holds extra side notes (c) holds copyright notes (d) sits at the very top
  16. 16.📝 Which input type picks a day? (a) submit (b) date (c) checkbox (d) number
  17. 17.🌗 Is light grey on white easy or hard to read? (a) hard to read (b) easy to read
  18. 18.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h2> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h6>
  19. 19.✍️ How many declarations (property: value pairs) are in this rule?
    li {
      font-style: italic;
      text-align: center;
      color: red;
      margin: 10px;
    }
  20. 20.Which of these goes in the body? (a) <style> (b) <meta charset="utf-8"> (c) <title> (d) <h1>
  21. 21.⚡ Which JavaScript word makes a new variable? (a) for (b) let (c) alert() (d) if
  22. 22.🌗 Is black on white easy or hard to read? (a) hard to read (b) easy to read
  23. 23.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Sky is blue<br>Stars shine</p>
  24. 24.🧭 Which semantic tag sits at the very top? (a) <header> (b) <article> (c) <footer> (d) <nav>
  25. 25.✍️ Which property is set to italic in this rule?
    body {
      text-align: center;
      font-style: italic;
    }
    (a) italic (b) font-size (c) font-style (d) color
  26. 26.🌈 Which hex code is blue? (a) #00ff00 (b) #ff00ff (c) #0000ff (d) #ffff00
  27. 27.🔗 Which words do you click on?
    <a href="about.html">School news</a>
    (a) Take the quiz (b) href (c) School news (d) about.html
  28. 28.📝 How many <input> tags are in this form?
    <form>
      <input type="date">
      <input type="email">
      <input type="number">
      <input type="password">
      <input type="text">
      <input type="submit" value="Send">
    </form>
  29. 29.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 8; i++) {
      total = total + i;
    }
    console.log(total);
  30. 30.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <p> (d) <pic>
  31. 31.🔁 How many times does this code print “Hi”?
    for (let i = 1; i <= 4; i++) {
      console.log("Hi");
    }
  32. 32.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
    (a) A red kite (b) width (c) A tiger asleep (d) tiger.jpg
  33. 33.🎯 Which CSS selector matches this element?
    <div class="big" id="hero">Hello</div>
    (a) span (b) .red (c) #top (d) .big
  34. 34.🌈 Which colour of light is strongest in rgb(113, 239, 23)? (a) green (b) blue (c) red
  35. 35.True or false: the border is the gap round content. (a) False (b) True
  36. 36.🖌️ Which CSS property makes the text bold? (a) color (b) font-weight (c) text-align (d) font-size
  37. 37.🖌️ How big is the text, in px?
    h2 {
      text-align: center;
      font-size: 20px;
      background-color: black;
      color: orange;
    }
  38. 38.What does justify-content: space-between do? (a) packs boxes at the start (b) equal gaps, none at ends (c) puts boxes in the middle (d) packs boxes at the end
  39. 39.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) editor (d) element
  40. 40.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <head> (d) <body>

Answer key

  1. padding
  2. <ul>
  3. teen
  4. bullets
  5. 11
  6. All about me
  7. /*
  8. 60
  9. 1
  10. makes headings and lists
  11. <style>
  12. in the head
  13. No
  14. HTML
  15. holds copyright notes
  16. date
  17. hard to read
  18. <h6>
  19. 4
  20. <h1>
  21. let
  22. easy to read
  23. 3
  24. <header>
  25. font-style
  26. #0000ff
  27. School news
  28. 6
  29. 36
  30. <img>
  31. 4
  32. A tiger asleep
  33. .big
  34. green
  35. False
  36. font-weight
  37. 20
  38. equal gaps, none at ends
  39. element
  40. <!DOCTYPE html>

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