← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 395 · 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 heading shows the SMALLEST text: <h1>, <h4>, <h6> or <h2>? (a) <h1> (b) <h4> (c) <h6> (d) <h2>
  2. 2.🔁 What does this code print?
    let age = 29;
    if (age >= 13) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) child (b) teen
  3. 3.Which of these is true of a code editor? (a) answers page requests (b) opens web pages for us (c) is where we type code (d) has an address bar
  4. 4.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Cricket is fun.</p>
    <p>My pets</p>
  5. 5.🎯 How many elements on a page should have the same id? (a) any number (b) 5 (c) 1 (d) 2
  6. 6.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h1> or <h3>? (a) <h5> (b) <h6> (c) <h3> (d) <h1>
  7. 7.💪 Which flexbox property turns on flexbox? (a) display: flex (b) gap (c) align-items (d) justify-content
  8. 8.🌍 What finds the server for a domain name like example.com? (a) CSS (b) DNS (c) alt (d) HTML
  9. 9.⚡ What does this code show?
    let name = "Kabir";
    alert("Welcome, " + name + "!");
    (a) Kabir (b) Welcome, name! (c) name (d) Welcome, Kabir!
  10. 10.🔗 Where does this link open?
    <a href="games.html" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab
  11. 11.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
  12. 12.🛡️ Should you share your password with your best friend? (a) Yes (b) No
  13. 13.📄 Can HTML on its own make links to pages? (a) No (b) Yes
  14. 14.True or false: a code editor shows pages from the web. (a) False (b) True
  15. 15.🔁 Which loop repeats code a set number of times? (a) if (b) else (c) for (d) let
  16. 16.📝 How many <input> tags are in this form?
    <form>
      <input type="text">
      <input type="date">
      <input type="number">
      <input type="submit" value="Send">
    </form>
  17. 17.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
    <p>The red kite</p>
  18. 18.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  19. 19.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  20. 20.Which of these does CSS do? (a) makes a form box (b) sets colours and fonts (c) checks a quiz answer (d) puts a picture on a page
  21. 21.🔢 In a basic web page file, which comes first: “</html>” or “<html>”? (a) <html> (b) </html>
  22. 22.Which colour pair is hard to read? (a) black on white (b) white on black (c) yellow on black (d) yellow on white
  23. 23.True or false: in <img>, alt sets how wide it is. (a) True (b) False
  24. 24.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
  25. 25.📱 Which tag helps phones show a page at the right size? (a) the hr tag (b) the viewport meta tag (c) the br tag (d) the title tag
  26. 26.📋 Which list tag is an ordered list? (a) <ol> (b) <li> (c) <ul>
  27. 27.True or false: .menu is a class selector. (a) False (b) True
  28. 28.📊 How many cells does this table have in all?
    <table>
      <tr><td>Grapes</td><td>Banana</td></tr>
      <tr><td>Orange</td><td>Jamun</td></tr>
      <tr><td>Jamun</td><td>Litchi</td></tr>
      <tr><td>Orange</td><td>Grapes</td></tr>
    </table>
  29. 29.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Guava</td><td>Papaya</td><td>Litchi</td></tr>
      <tr><td>Guava</td><td>Mango</td><td>Orange</td></tr>
      <tr><td>Guava</td><td>Mango</td><td>Guava</td></tr>
    </table>
  30. 30.True or false: <ol> is an ordered list. (a) True (b) False
  31. 31.⚡ What does this code show?
    let name = "Arjun";
    alert("Well done, " + name + "!");
    (a) Well done, name! (b) name (c) Arjun (d) Well done, Arjun!
  32. 32.🔐 Is Rain#Drop_42! a strong or a weak password? (a) weak (b) strong
  33. 33.♿ Which link text is clearest? (a) click here (b) here (c) Read the fruit facts (d) link
  34. 34.📱 The screen is 414px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 28px;
      }
    }
  35. 35.True or false: <hr> has a closing tag. (a) True (b) False
  36. 36.True or false: <h1> is an empty tag. (a) True (b) False
  37. 37.True or false: <li> is an empty tag. (a) False (b) True
  38. 38.True or false: JavaScript makes a form box. (a) False (b) True
  39. 39.🖌️ What colour are the letters?
    h1 {
      font-size: 12px;
      background-color: orange;
      text-align: right;
      color: red;
    }
    (a) orange (b) red (c) white
  40. 40.🖌️ Where does the text sit on its line?
    p {
      text-align: left;
      background-color: yellow;
      color: blue;
      font-size: 40px;
    }
    (a) on the left (b) in the middle (c) on the right

Answer key

  1. <h6>
  2. teen
  3. is where we type code
  4. 1
  5. 1
  6. <h1>
  7. display: flex
  8. DNS
  9. Welcome, Kabir!
  10. in a new tab
  11. Yes
  12. No
  13. Yes
  14. False
  15. for
  16. 4
  17. 3
  18. an empty tag
  19. No
  20. sets colours and fonts
  21. <html>
  22. yellow on white
  23. False
  24. red
  25. the viewport meta tag
  26. <ol>
  27. True
  28. 8
  29. 3
  30. True
  31. Well done, Arjun!
  32. strong
  33. Read the fruit facts
  34. 24
  35. False
  36. False
  37. False
  38. False
  39. red
  40. on the left

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