← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 832 · 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 many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Our school trip</p>
    <p>Our school trip</p>
    <p>Hello, world!</p>
  2. 2.What does justify-content: space-between do? (a) equal gaps, none at ends (b) puts boxes in the middle (c) packs boxes at the end (d) packs boxes at the start
  3. 3.🌈 In #00c500 the green part is the hex number c5. What is it as a normal number?
  4. 4.🔁 When does the else part run? (a) when if is true (b) always (c) never (d) when if is false
  5. 5.⚡ What does JavaScript add to a web page? (a) actions and changes (b) the domain name (c) the page title (d) only colours
  6. 6.Which of these goes in the head? (a) <h1> (b) <a> (c) <img> (d) <meta charset="utf-8">
  7. 7.📊 Which tag makes one table row? (a) <table> (b) <caption> (c) <th> (d) <tr>
  8. 8.🔁 What does this code print?
    let temp = 31;
    if (temp > 18) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Cool (b) Hot
  9. 9.🔗 Where does this link open?
    <a href="https://example.com">Contact us</a>
    (a) in a new tab (b) in the same tab
  10. 10.🎯 Which element does the selector #top style? (a) <h1 class="box"> (b) <p class="top"> (c) <p id="intro"> (d) <p id="top">
  11. 11.🔢 On a typical page, from top to bottom, what comes right after “<header>”? (a) <footer> (b) <main> (c) <nav>
  12. 12.🌈 Which hex code is black? (a) #ff00ff (b) #000000 (c) #ffffff (d) #ff0000
  13. 13.True or false: HTML on its own cannot make bullet lists. (a) True (b) False
  14. 14.⚡ What number does this code print?
    let marks = 22;
    marks = marks + 19;
    marks = marks - 4;
    console.log(marks);
  15. 15.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="colour"> Red
      <input type="checkbox" name="colour"> Pink
      <input type="checkbox" name="colour"> Orange
    </form>
  16. 16.🚀 Which file should this code go in: <ul><li>Art</li></ul> (a) script.js (b) style.css (c) index.html
  17. 17.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
  18. 18.⚖️ What colour is the text of this element?
    <h1 class="note" id="logo">Hi</h1>
    CSS:
    .note { color: white; }
    #logo { color: red; }
    h1 { color: purple; }
    (a) orange (b) white (c) red (d) purple
  19. 19.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">
  20. 20.📱 The screen is 700px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 14px;
      }
    }
    (a) Yes (b) No
  21. 21.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>Rain today</h2>
    <p>Good morning!</p>
  22. 22.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  23. 23.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
    <p>Rain today</p>
    (a) Rain today (b) I love mangoes. (c) Good morning!
  24. 24.📝 Which input type is for one line of words? (a) email (b) password (c) text (d) checkbox
  25. 25.Which of these does HTML do? (a) makes headings and lists (b) rounds box corners (c) checks a quiz answer (d) adds space around boxes
  26. 26.True or false: <input type="password"> picks a day. (a) False (b) True
  27. 27.🏷️ Which is the closing tag for <i>? (a) <\i> (b) </i> (c) <i/> (d) <i>
  28. 28.Which of these is an opening tag? (a) </h1> (b) </p> (c) </li> (d) <h1>
  29. 29.True or false: the border is the line round the box. (a) False (b) True
  30. 30.📊 How many cells are in each row?
    <table>
      <tr><td>Orange</td><td>Banana</td><td>Jamun</td></tr>
      <tr><td>Litchi</td><td>Mango</td><td>Papaya</td></tr>
      <tr><td>Jamun</td><td>Grapes</td><td>Guava</td></tr>
    </table>
  31. 31.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
  32. 32.🌍 What is the domain name in this URL?
    https://kids.example.org/index.html
    (a) kids.example.org (b) https (c) /index.html (d) school.example.in
  33. 33.True or false: <meta> is an empty tag. (a) False (b) True
  34. 34.🔢 To build and share your first web page, which comes first: “write the HTML” or “add CSS styles”? (a) add CSS styles (b) write the HTML
  35. 35.🔁 What does i++ do? (a) doubles i (b) adds 1 to i (c) prints i (d) takes 1 from i
  36. 36.🖌️ What colour are the letters?
    li {
      color: yellow;
      font-size: 24px;
      background-color: red;
      text-align: left;
    }
    (a) red (b) purple (c) yellow
  37. 37.🎯 Which element does the selector .box style? (a) <p id="box"> (b) <p class="box"> (c) <p class="star"> (d) <h1 class="menu">
  38. 38.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) We won by 5 runs. (b) Riya’s Recipes (c) index.html (d) Match report
  39. 39.🔗 Which words do you click on?
    <a href="quiz.html">School news</a>
    (a) href (b) quiz.html (c) Take the quiz (d) School news
  40. 40.🖼️ Does <img> need a closing tag? (a) No (b) Yes

Answer key

  1. 1
  2. equal gaps, none at ends
  3. 197
  4. when if is false
  5. actions and changes
  6. <meta charset="utf-8">
  7. <tr>
  8. Hot
  9. in the same tab
  10. <p id="top">
  11. <nav>
  12. #000000
  13. False
  14. 37
  15. 3
  16. index.html
  17. <!--
  18. red
  19. <a href="about.html">
  20. No
  21. 2
  22. a closing tag
  23. Good morning!
  24. text
  25. makes headings and lists
  26. False
  27. </i>
  28. <h1>
  29. True
  30. 3
  31. 3
  32. kids.example.org
  33. True
  34. write the HTML
  35. adds 1 to i
  36. yellow
  37. <p class="box">
  38. Riya’s Recipes
  39. School news
  40. No

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