← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 254 · 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) post your home address (b) use a strong password (c) share your password (d) type a password on http
  2. 2.🔁 How many times does this code print “Hi”?
    for (let i = 0; i <= 3; i++) {
      console.log("Hi");
    }
  3. 3.True or false: <input type="radio"> lets you pick only one. (a) True (b) False
  4. 4.💬 How does an HTML comment start? (a) <!-- (b) /* (c) // (d) #
  5. 5.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
  6. 6.⚡ Which tag holds JavaScript in a page? (a) <code> (b) <style> (c) <script> (d) <js>
  7. 7.📱 The screen is 320px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 10px;
      }
    }
    (a) No (b) Yes
  8. 8.True or false: HTML on its own cannot add up two numbers. (a) False (b) True
  9. 9.🎯 What kind of selector is #logo? (a) a class selector (b) an element selector (c) an id selector
  10. 10.⚡ Which JavaScript word makes a new variable? (a) if (b) let (c) for (d) alert()
  11. 11.🔗 Which words do you click on?
    <a href="art.html">Play games</a>
    (a) Play games (b) art.html (c) About us (d) href
  12. 12.True or false: the server shows the page to you. (a) True (b) False
  13. 13.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ul> (d) <ol>
  14. 14.✍️ How many declarations (property: value pairs) are in this rule?
    h1 {
      padding: 8px;
      font-style: italic;
    }
  15. 15.True or false: <ul><li>Art</li></ul> goes in style.css. (a) True (b) False
  16. 16.🔗 Which address opens when you click this link?
    <a href="contact.html">School news</a>
    (a) School news (b) contact.html (c) https://example.com (d) maths.html
  17. 17.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  18. 18.📱 The screen is 820px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 18px;
      }
    }
    (a) No (b) Yes
  19. 19.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>
  20. 20.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 160px;
      padding: 5px;
      border: 3px solid black;
      margin: 0px;
    }
  21. 21.🔐 Is 123456 a strong or a weak password? (a) strong (b) weak
  22. 22.🔢 To build and share your first web page, which comes LAST? (a) test in a browser (b) publish it online (c) plan what to show (d) add CSS styles
  23. 23.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) magenta (c) black (d) red
  24. 24.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ul>
  25. 25.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    (a) Hello, world! (b) Our school trip (c) Fun facts
  26. 26.📝 Which input type takes only numbers? (a) number (b) email (c) submit (d) text
  27. 27.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Guava</li>
    </ol>
  28. 28.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 22px;
      }
    }
  29. 29.Which of these is a strong password? (a) 111111 (b) Blue@Tiger_74 (c) iloveyou (d) abcd1234
  30. 30.Which of these is true of <aside>? (a) sits at the very top (b) holds a side box of tips (c) is the page’s key part (d) helps you move around
  31. 31.Which of these is true of a web browser? (a) colours code to help us (b) turns HTML into a page (c) saves our .html files (d) is where we type code
  32. 32.🏷️ Which is the closing tag for <b>? (a) <\b> (b) </b> (c) <b> (d) <b/>
  33. 33.🎨 Which attribute adds CSS inside one tag? (a) src (b) href (c) style (d) alt
  34. 34.📊 Are <th> cells shown bold and centred by default? (a) No (b) Yes
  35. 35.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) index.html (b) My Hobbies (c) My drawings (d) Here is my best one.
  36. 36.⚡ What number does this code print?
    let a = 10;
    let b = 9;
    console.log(a - b);
  37. 37.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
  38. 38.Which colour pair is hard to read? (a) red on green (b) black on white (c) white on dark blue (d) dark grey on white
  39. 39.📝 Which input type sends the form? (a) radio (b) checkbox (c) email (d) submit
  40. 40.🧭 Is <nav> semantic or not semantic? (a) semantic (b) not semantic

Answer key

  1. use a strong password
  2. 4
  3. True
  4. <!--
  5. F
  6. <script>
  7. Yes
  8. True
  9. an id selector
  10. let
  11. Play games
  12. False
  13. <ul>
  14. 2
  15. False
  16. contact.html
  17. an opening tag
  18. Yes
  19. <ol>
  20. 176
  21. weak
  22. publish it online
  23. magenta
  24. 5
  25. Fun facts
  26. number
  27. 4
  28. 20
  29. Blue@Tiger_74
  30. holds a side box of tips
  31. turns HTML into a page
  32. </b>
  33. style
  34. Yes
  35. My Hobbies
  36. 1
  37. 400
  38. red on green
  39. submit
  40. semantic

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