← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 561 · 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 of these is safe to do online? (a) click prize links (b) share your OTP (c) put secrets in comments (d) check for https first
  2. 2.True or false: <li> is an empty tag. (a) True (b) False
  3. 3.True or false: console.log(5 + 2); goes in style.css. (a) True (b) False
  4. 4.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  5. 5.⚡ What does this code show?
    let name = "Kabir";
    console.log("Hello, " + name + "!");
    (a) Hello, Kabir! (b) Kabir (c) Hello, name! (d) name
  6. 6.📝 Which tag makes a big box for many lines of text? (a) <br> (b) <textarea> (c) <input> (d) <p>
  7. 7.True or false: alert(score); goes in script.js. (a) True (b) False
  8. 8.🔁 What does this code print?
    let temp = 32;
    if (temp >= 6) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Hot (b) Cool
  9. 9.🖌️ Which CSS property picks the font style? (a) font-family (b) color (c) background-color (d) font-size
  10. 10.🌈 Which colour of light is strongest in rgb(1, 220, 40)? (a) green (b) red (c) blue
  11. 11.🔍 One closing tag is missing. Which one?
    <strong>Rain today</strong>
    <h1>My best friend
    <h2>I love mangoes.</h2>
    (a) </strong> (b) </em> (c) </h1> (d) </h2>
  12. 12.🎯 Which CSS selector matches this element?
    <h2 class="star" id="intro">Hello</h2>
    (a) .menu (b) li (c) #intro (d) #star
  13. 13.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h3> or <h4>? (a) <h3> (b) <h1> (c) <h4> (d) <h6>
  14. 14.True or false: HTML adds space around boxes. (a) False (b) True
  15. 15.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="sport"> Chess
      <input type="radio" name="sport"> Football
      <input type="radio" name="sport"> Cricket
      <input type="radio" name="sport"> Kabaddi
      <input type="radio" name="sport"> Hockey
    </form>
  16. 16.🔁 What does this code print?
    let age = 27;
    if (age > 43) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  17. 17.⚡ What does this code print? (Look at the quotes!)
    let x = "3";
    let y = 6;
    console.log(x + y);
    (a) Error (b) 9 (c) 36
  18. 18.Which colour pair is easy to read? (a) light grey on white (b) red on green (c) pink on red (d) dark grey on white
  19. 19.True or false: <hr> has a closing tag. (a) True (b) False
  20. 20.🖌️ Which CSS property makes the text bold? (a) font-family (b) text-align (c) font-weight (d) background-color
  21. 21.🎯 Which element does the selector h2 style? (a) <h2 class="note"> (b) <li> (c) <div class="note"> (d) <span id="logo">
  22. 22.🔢 On a typical page, from top to bottom, what comes right after “<nav>”? (a) <header> (b) <main> (c) <footer>
  23. 23.🌍 What is the protocol in this URL?
    https://kids.example.org/art/gallery.html
    (a) kids.example.org (b) /art/gallery.html (c) http (d) https
  24. 24.💬 Does the browser show comments on the page? (a) No (b) Yes
  25. 25.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h1>? (a) <h3> (b) <h6> (c) <h2> (d) <h1>
  26. 26.🔁 How many times does this code print “Welcome”?
    for (let i = 2; i < 10; i++) {
      console.log("Welcome");
    }
  27. 27.Which of these is an opening tag? (a) </b> (b) </body> (c) <b> (d) </title>
  28. 28.True or false: <h1> goes in the body. (a) True (b) False
  29. 29.🌈 Which colour of light is strongest in rgb(33, 57, 234)? (a) red (b) blue (c) green
  30. 30.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  31. 31.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <table> (c) <style> (d) <title>
  32. 32.⚡ What number does this code print?
    let a = 35;
    let b = 1;
    console.log(a - b);
  33. 33.✍️ What value is given to font-style in this rule?
    h1 {
      text-align: center;
      border: 2px solid;
      margin: 10px;
      font-style: italic;
    }
    (a) font-style (b) red (c) italic (d) 20px
  34. 34.🚀 What is the home page file of a website usually called? (a) home.css (b) start.js (c) main.png (d) index.html
  35. 35.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 200px;
      padding: 30px;
      border: 1px solid black;
      margin: 20px;
    }
  36. 36.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) index.html (b) Easy snacks (c) Riya’s Recipes (d) I like to read.
  37. 37.True or false: the server is the page’s address. (a) True (b) False
  38. 38.True or false: JavaScript changes the page live. (a) False (b) True
  39. 39.Which of these is true of <nav>? (a) holds the main content (b) helps you move around (c) holds one blog post (d) holds the logo and title
  40. 40.True or false: the border is the text or picture. (a) True (b) False

Answer key

  1. check for https first
  2. False
  3. False
  4. Yes
  5. Hello, Kabir!
  6. <textarea>
  7. True
  8. Hot
  9. font-family
  10. green
  11. </h1>
  12. #intro
  13. <h6>
  14. False
  15. 1
  16. child
  17. 36
  18. dark grey on white
  19. False
  20. font-weight
  21. <h2 class="note">
  22. <main>
  23. https
  24. No
  25. <h1>
  26. 8
  27. <b>
  28. True
  29. blue
  30. No
  31. <table>
  32. 34
  33. italic
  34. index.html
  35. 262
  36. Riya’s Recipes
  37. False
  38. True
  39. helps you move around
  40. False

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