← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 567 · 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.⚡ What number does this code print?
    let a = 4;
    let b = 2;
    console.log(a * b);
  2. 2.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the later one (c) the shorter one (d) the first one
  3. 3.Which of these is safe to do online? (a) log out on shared PCs (b) post your home address (c) share your password (d) click prize links
  4. 4.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 9; i = i + 3) {
      console.log(i);
    }
  5. 5.🖌️ What colour are the letters?
    li {
      background-color: white;
      text-align: center;
      font-size: 40px;
      color: orange;
    }
    (a) white (b) orange (c) blue
  6. 6.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to show pictures (d) to leave notes
  7. 7.🌈 Which colour is #00ff00? (a) blue (b) yellow (c) white (d) bright green
  8. 8.🌗 Is white on black easy or hard to read? (a) easy to read (b) hard to read
  9. 9.True or false: <meta> has a closing tag. (a) False (b) True
  10. 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 6 (d) 2
  11. 11.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) in a big heading (d) on the browser tab
  12. 12.✍️ In color: blue; which part is the property? (a) color (b) : (c) ; (d) blue
  13. 13.True or false: <ul> shows bullet points. (a) False (b) True
  14. 14.🚀 Which file should this code go in: <a href="a.html">Go</a> (a) script.js (b) index.html (c) style.css
  15. 15.📊 In a table, which tag is a row? (a) <th> (b) <td> (c) <tb> (d) <tr>
  16. 16.🚀 Which program lets you see your web page while you build it? (a) a photo viewer (b) a music player (c) a calculator (d) a web browser
  17. 17.🔁 What does this code print?
    let marks = 12;
    if (marks >= 25) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Try again (b) Pass
  18. 18.🧭 Which semantic tag holds one blog post? (a) <footer> (b) <header> (c) <article> (d) <nav>
  19. 19.🌍 What is the protocol in this URL?
    https://www.example.com/art/gallery.html
    (a) /art/gallery.html (b) www.example.com (c) http (d) https
  20. 20.🎯 Which sign starts an id selector? (a) . (b) @ (c) & (d) #
  21. 21.⚡ What does this code print? (Look at the quotes!)
    let x = "5";
    let y = 4;
    console.log(x + y);
    (a) Error (b) 9 (c) 54
  22. 22.Which of these is the border? (a) the gap round content (b) a solid or dotted edge (c) space inside the border (d) the text or picture
  23. 23.🖌️ What colour are the letters?
    h1 {
      background-color: black;
      font-size: 40px;
      text-align: left;
      color: orange;
    }
    (a) black (b) orange (c) blue
  24. 24.🔗 Where does this link open?
    <a href="news.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  25. 25.🎨 One CSS file can style how many pages? (a) many pages (b) only one image (c) no pages (d) only one word
  26. 26.🔁 What does this code print?
    let age = 48;
    if (age >= 5) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) child (b) teen
  27. 27.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ul>
  28. 28.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
  29. 29.🌈 In #002400 the green part is the hex number 24. What is it as a normal number?
  30. 30.🔁 What does this code print?
    let age = 27;
    if (age >= 40) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  31. 31.Which of these does JavaScript do? (a) changes the text size (b) makes a form box (c) rounds box corners (d) changes the page live
  32. 32.🎯 Can many elements share the same class? (a) Yes (b) No
  33. 33.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 10; i++) {
      total = total + 5;
    }
    console.log(total);
  34. 34.True or false: in <img>, alt tells which image to load. (a) False (b) True
  35. 35.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 410px;
      justify-content: flex-end;
    }
    Inside are 4 boxes, each 100px wide (no margins).
  36. 36.🎯 What kind of selector is .card? (a) an id selector (b) an element selector (c) a class selector
  37. 37.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
  38. 38.🔁 How many times does this code print “Well done”?
    for (let i = 3; i <= 11; i++) {
      console.log("Well done");
    }
  39. 39.What does text-align do? (a) makes letters bigger (b) picks the font style (c) colours behind the text (d) centres a heading
  40. 40.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h6> or <h3>? (a) <h5> (b) <h2> (c) <h3> (d) <h6>

Answer key

  1. 8
  2. the later one
  3. log out on shared PCs
  4. 6
  5. orange
  6. to leave notes
  7. bright green
  8. easy to read
  9. False
  10. 3
  11. on the browser tab
  12. color
  13. True
  14. index.html
  15. <tr>
  16. a web browser
  17. Try again
  18. <article>
  19. https
  20. #
  21. 54
  22. a solid or dotted edge
  23. orange
  24. in a new tab
  25. many pages
  26. teen
  27. 3
  28. <a>
  29. 36
  30. child
  31. changes the page live
  32. Yes
  33. 50
  34. False
  35. 10
  36. a class selector
  37. blue
  38. 9
  39. centres a heading
  40. <h2>

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