← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 924 · 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.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 10px;
      }
    }
  2. 2.🔁 Which loop repeats code a set number of times? (a) else (b) let (c) for (d) if
  3. 3.⚡ Which word makes a new variable? (a) let (b) make (c) put (d) give
  4. 4.🎯 Which CSS selector matches this element?
    <h1 class="star" id="main">Hello</h1>
    (a) #star (b) h2 (c) .star (d) #logo
  5. 5.True or false: <a> goes in the head. (a) True (b) False
  6. 6.True or false: the server asks for a web page. (a) False (b) True
  7. 7.True or false: <li> is one item of a list. (a) True (b) False
  8. 8.True or false: to use a strong password is safe. (a) False (b) True
  9. 9.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h1> or <h6>? (a) <h4> (b) <h6> (c) <h2> (d) <h1>
  10. 10.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <style> (d) <h1>
  11. 11.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
  12. 12.📝 Which input type is for an email address? (a) password (b) number (c) text (d) email
  13. 13.⚖️ What colour is the text of this element?
    <h1 class="box" id="logo">Hi</h1>
    CSS:
    #logo { color: red; }
    .box { color: orange; }
    (a) purple (b) orange (c) white (d) red
  14. 14.⚡ What number does this code print?
    let a = 10;
    let b = 2;
    console.log(a * b);
  15. 15.True or false: the content is a solid or dotted edge. (a) True (b) False
  16. 16.📝 How many <input> tags are in this form?
    <form>
      <input type="password">
      <input type="text">
      <input type="checkbox">
      <input type="date">
      <input type="email">
      <input type="submit" value="Send">
    </form>
  17. 17.🛡️ Online: is it safe to ask before downloading? (a) not safe (b) safe
  18. 18.🎯 How many elements on a page should have the same id? (a) any number (b) 2 (c) 1 (d) 5
  19. 19.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <!-- <p>My best friend</p> -->
  20. 20.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <ol> (d) <hr>
  21. 21.🎨 Which tag connects an outside CSS file? (a) <css> (b) <a> (c) <link> (d) <img>
  22. 22.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 120px;
      padding: 20px;
      border: 2px solid black;
      margin: 15px;
    }
  23. 23.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>My best friend</p>
    <h2>Rain today</h2>
    <h2>My best friend</h2>
  24. 24.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    <p>My best friend</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Good morning!</p>
  25. 25.🎯 What kind of selector is .big? (a) an id selector (b) an element selector (c) a class selector
  26. 26.True or false: body { margin: 0; } goes in style.css. (a) False (b) True
  27. 27.📝 How many <input> tags are in this form?
    <form>
      <input type="password">
      <input type="checkbox">
      <input type="submit" value="Send">
    </form>
  28. 28.🔍 Which is the odd one out? (a) changes the text size (b) makes a link (c) sets colours and fonts (d) lays out the page
  29. 29.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <table> (c) <meta charset="utf-8"> (d) <style>
  30. 30.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h4>Hello, world!</h4>
    <p>Our school trip</p>
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) dog.jpg (b) The full moon (c) A happy dog (d) width
  32. 32.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as a dot (c) as 5 spaces (d) as one space
  33. 33.♿ Which link text is clearest? (a) click here (b) Read the fruit facts (c) link (d) here
  34. 34.🌗 Is yellow on white easy or hard to read? (a) hard to read (b) easy to read
  35. 35.📊 In a table, which tag is a row? (a) <th> (b) <td> (c) <tr> (d) <tb>
  36. 36.Which of these does JavaScript do? (a) changes the page live (b) makes headings and lists (c) makes a link (d) sets colours and fonts
  37. 37.Which of these is an opening tag? (a) <title> (b) </li> (c) </b> (d) </p>
  38. 38.📄 Can HTML on its own count button clicks? (a) Yes (b) No
  39. 39.Which of these is a weak password? (a) Kite_Fl1es@Dawn (b) S0lar!Pen#8 (c) Blue@Tiger_74 (d) 111111
  40. 40.⚡ What does this code show?
    let name = "Kabir";
    console.log("Hello, " + name + "!");
    (a) Kabir (b) Hello, name! (c) Hello, Kabir! (d) name

Answer key

  1. 12
  2. for
  3. let
  4. .star
  5. False
  6. False
  7. True
  8. True
  9. <h6>
  10. <h1>
  11. -->
  12. email
  13. red
  14. 20
  15. False
  16. 6
  17. safe
  18. 1
  19. 2
  20. <ul>
  21. <link>
  22. 164
  23. 2
  24. 3
  25. a class selector
  26. True
  27. 3
  28. makes a link
  29. <table>
  30. 2
  31. A happy dog
  32. as one space
  33. Read the fruit facts
  34. hard to read
  35. <tr>
  36. changes the page live
  37. <title>
  38. No
  39. 111111
  40. Hello, Kabir!

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