← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 284 · 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 much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 190px;
      justify-content: flex-start;
    }
    Inside are 3 boxes, each 40px wide (no margins).
  2. 2.Which of these is true of a web server? (a) has an address bar (b) shows pages from the web (c) saves our .html files (d) stores a website’s files
  3. 3.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <h2> (c) <h2/> (d) <\h2>
  4. 4.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
  5. 5.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
  6. 6.Which of these is true of a code editor? (a) answers page requests (b) sends pages over the net (c) hosts websites online (d) shows line numbers
  7. 7.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Guava</li>
    </ol>
  8. 8.🔁 How many numbers does this code print?
    for (let i = 0; i < 15; i = i + 2) {
      console.log(i);
    }
  9. 9.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Mango</li>
    </ul>
    (a) numbers (b) bullets
  10. 10.🖌️ Which CSS property centres a heading? (a) text-align (b) color (c) font-weight (d) font-family
  11. 11.💾 A web page file usually ends with which extension? (a) .txt (b) .mp3 (c) .html (d) .png
  12. 12.Which of these is a closing tag? (a) </li> (b) <h1> (c) <li> (d) <p>
  13. 13.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) <h1/> (c) </h1> (d) <h1>
  14. 14.🔁 What does this code print?
    let age = 1;
    if (age >= 21) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  15. 15.True or false: <table> goes in the head. (a) True (b) False
  16. 16.Which of these is an opening tag? (a) </title> (b) </b> (c) </li> (d) <title>
  17. 17.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Fun facts</p>
    <p>Fun facts</p>
    <p>My best friend</p>
  18. 18.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
  19. 19.♿ A part of the page is under a <h1> heading. Which tag should its sub-heading use? (a) <h4> (b) <h6> (c) <h5> (d) <h2>
  20. 20.What is <input type="password"> for? (a) sends the form (b) is for one line of words (c) takes only numbers (d) hides what you type
  21. 21.🌈 Which hex code is blue? (a) #ffff00 (b) #ff0000 (c) #0000ff (d) #00ff00
  22. 22.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Stars shine<br>Birds sing</p>
  23. 23.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a slash / (d) a hash #
  24. 24.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h6> or <h3>? (a) <h2> (b) <h6> (c) <h5> (d) <h3>
  25. 25.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 60px;
      padding: 30px;
      border: 5px solid black;
      margin: 0px;
    }
  26. 26.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 22px;
      }
    }
  27. 27.🔍 One closing tag is missing. Which one?
    <h1>Hello, world!
    <h2>The red kite</h2>
    <small>Good morning!</small>
    (a) </h2> (b) </small> (c) </u> (d) </h1>
  28. 28.🛡️ Online: is it safe to type a password on http? (a) not safe (b) safe
  29. 29.📦 In the box model, which part is the gap round content? (a) border (b) content (c) padding (d) margin
  30. 30.True or false: a web browser sends pages over the net. (a) False (b) True
  31. 31.🔁 What does i++ do? (a) takes 1 from i (b) adds 1 to i (c) doubles i (d) prints i
  32. 32.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 140px;
      justify-content: flex-start;
    }
    Inside are 2 boxes, each 60px wide (no margins).
  33. 33.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 18; i = i + 2) {
      console.log(i);
    }
  34. 34.🔐 Is password a strong or a weak password? (a) weak (b) strong
  35. 35.True or false: <ul> is an ordered list. (a) True (b) False
  36. 36.💪 Which justify-content value packs boxes at the end? (a) flex-start (b) flex-end (c) center (d) space-between
  37. 37.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Good morning!</p>
    <p>Rain today</p>
    (a) Cricket is fun. (b) Good morning! (c) Rain today
  38. 38.🔍 One closing tag is missing. Which one?
    <h3>Fun facts</h3>
    <h2>The red kite</h2>
    <em>Our school trip
    (a) </h1> (b) </h2> (c) </em> (d) </h3>
  39. 39.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="fruit"> Banana
      <input type="radio" name="fruit"> Guava
      <input type="radio" name="fruit"> Litchi
      <input type="radio" name="fruit"> Mango
      <input type="radio" name="fruit"> Papaya
    </form>
  40. 40.🔁 How many times does this code print “Hello”?
    for (let i = 0; i < 3; i++) {
      console.log("Hello");
    }

Answer key

  1. 70
  2. stores a website’s files
  3. </h2>
  4. <a>
  5. <a href="about.html">
  6. shows line numbers
  7. 6
  8. 8
  9. bullets
  10. text-align
  11. .html
  12. </li>
  13. </h1>
  14. child
  15. False
  16. <title>
  17. 1
  18. blue
  19. <h2>
  20. hides what you type
  21. #0000ff
  22. 3
  23. a slash /
  24. <h2>
  25. 130
  26. 22
  27. </h1>
  28. not safe
  29. padding
  30. False
  31. adds 1 to i
  32. 20
  33. 16
  34. weak
  35. False
  36. flex-end
  37. Cricket is fun.
  38. </em>
  39. 1
  40. 3

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