← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 82 · 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 does an HTML comment end? (a) */ (b) >> (c) --> (d) //
  2. 2.🔗 Which address opens when you click this link?
    <a href="quiz.html">Maths fun</a>
    (a) Maths fun (b) games.html (c) about.html (d) quiz.html
  3. 3.True or false: img is a class selector. (a) True (b) False
  4. 4.🔢 In a basic web page file, which comes first: “<head>” or “</body>”? (a) <head> (b) </body>
  5. 5.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ul> (d) <ol>
  6. 6.⚖️ What colour is the text of this element?
    <p class="big" id="hero">Hi</p>
    CSS:
    p { color: blue; }
    #hero { color: white; }
    .big { color: yellow; }
    (a) purple (b) blue (c) yellow (d) white
  7. 7.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) bright green (c) cyan (d) magenta
  8. 8.🔍 One closing tag is missing. Which one?
    <strong>Hello, world!
    <h3>My pets</h3>
    <h1>Fun facts</h1>
    (a) </h1> (b) </strong> (c) </p> (d) </h3>
  9. 9.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 12px;
      }
    }
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Stars shine</p>
  11. 11.True or false: in <img>, src shows if the image fails. (a) True (b) False
  12. 12.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 90px;
      padding: 15px;
      border: 2px solid black;
      margin: 0px;
    }
  13. 13.Which of these goes in the head? (a) <a> (b) <p> (c) <meta charset="utf-8"> (d) <h1>
  14. 14.🔁 Which loop repeats code a set number of times? (a) for (b) if (c) else (d) let
  15. 15.🛡️ Should you share your password with your best friend? (a) No (b) Yes
  16. 16.🌈 Which hex code is red? (a) #00ffff (b) #00ff00 (c) #ff00ff (d) #ff0000
  17. 17.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h4>The red kite</h4>
    <p>Fun facts</p>
  18. 18.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>I love mangoes.</h2>
    <p>Cricket is fun.</p>
  19. 19.Which of these goes in the body? (a) <p> (b) <link rel="stylesheet"> (c) <title> (d) <style>
  20. 20.Which colour pair is easy to read? (a) yellow on white (b) blue on purple (c) red on green (d) yellow on black
  21. 21.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h5> or <h2>? (a) <h2> (b) <h5> (c) <h4> (d) <h1>
  22. 22.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  23. 23.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
    <p>My best friend</p>
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) My best friend (c) Cricket is fun. (d) Hello, world!
  24. 24.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the doctype (d) the title
  25. 25.True or false: console.log(5 + 2); goes in style.css. (a) True (b) False
  26. 26.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Orange</li>
    </ol>
  27. 27.True or false: <caption> holds the whole table. (a) False (b) True
  28. 28.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Rain today</p>
    <h2>Our school trip</h2>
    <p>The red kite</p>
    <p>I love mangoes.</p>
  29. 29.True or false: margin is space outside the border. (a) False (b) True
  30. 30.True or false: a web browser sends pages over the net. (a) True (b) False
  31. 31.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Planets (b) Try this poha. (c) index.html (d) My Hobbies
  32. 32.🔢 To build and share your first web page, which comes first: “add CSS styles” or “test in a browser”? (a) add CSS styles (b) test in a browser
  33. 33.True or false: <ol> lists steps in order. (a) False (b) True
  34. 34.🛡️ Before typing a password on a site, check the address starts with ___. (a) https (b) www (c) ftp (d) http
  35. 35.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h6> or <h5>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
  36. 36.🔁 What does this code print?
    let marks = 26;
    if (marks > 10) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Pass (b) Try again
  37. 37.⚖️ What colour is the text of this element?
    <p class="box" id="top">Hi</p>
    CSS:
    #top { color: green; }
    .box { color: yellow; }
    p { color: purple; }
    (a) orange (b) purple (c) green (d) yellow
  38. 38.🔢 In a basic web page file, which comes first: “<head>” or “</head>”? (a) </head> (b) <head>
  39. 39.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 9; i = i + 3) {
      console.log(i);
    }
  40. 40.📝 How many <input> tags are in this form?
    <form>
      <input type="email">
      <input type="date">
      <input type="password">
      <input type="text">
      <input type="number">
      <input type="submit" value="Send">
    </form>

Answer key

  1. -->
  2. quiz.html
  3. False
  4. <head>
  5. <ul>
  6. white
  7. magenta
  8. </strong>
  9. 12
  10. 2
  11. False
  12. 124
  13. <meta charset="utf-8">
  14. for
  15. No
  16. #ff0000
  17. 2
  18. 2
  19. <p>
  20. yellow on black
  21. <h5>
  22. an opening tag
  23. Hello, world!
  24. the body
  25. False
  26. 2
  27. False
  28. 2
  29. True
  30. False
  31. My Hobbies
  32. add CSS styles
  33. True
  34. https
  35. <h6>
  36. Pass
  37. green
  38. <head>
  39. 6
  40. 6

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