← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 139 · 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 input type takes only numbers? (a) submit (b) number (c) date (d) password
  2. 2.True or false: <input type="checkbox"> sends the form. (a) True (b) False
  3. 3.Which of these goes in the head? (a) <table> (b) <p> (c) <title> (d) <a>
  4. 4.⚖️ What colour is the text of this element?
    <p class="big" id="logo">Hi</p>
    CSS:
    p { color: yellow; }
    p { color: orange; }
    (a) blue (b) yellow (c) orange (d) white
  5. 5.True or false: CSS rounds box corners. (a) False (b) True
  6. 6.True or false: <td> makes one data cell. (a) True (b) False
  7. 7.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) src (d) href
  8. 8.🖌️ How big is the text, in px?
    h1 {
      background-color: white;
      font-size: 36px;
      text-align: right;
      color: orange;
    }
  9. 9.True or false: #end is an element selector. (a) True (b) False
  10. 10.True or false: <li> lists things in any order. (a) True (b) False
  11. 11.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 8; i++) {
      total = total + i;
    }
    console.log(total);
  12. 12.🔁 When does the else part run? (a) when if is false (b) when if is true (c) always (d) never
  13. 13.🎯 What kind of selector is p? (a) an element selector (b) an id selector (c) a class selector
  14. 14.True or false: padding is the line round the box. (a) True (b) False
  15. 15.🎯 What kind of selector is h1? (a) a class selector (b) an id selector (c) an element selector
  16. 16.🔍 Which is the odd one out? (a) rounds box corners (b) checks a quiz answer (c) reacts to a button click (d) shows a pop-up message
  17. 17.🛡️ Online: is it safe to put secrets in comments? (a) not safe (b) safe
  18. 18.🔗 Which address opens when you click this link?
    <a href="about.html">About us</a>
    (a) about.html (b) https://example.com (c) About us (d) contact.html
  19. 19.🔁 Which word runs code only when something is true? (a) let (b) if (c) for (d) log
  20. 20.✍️ In color: blue; which part is the property? (a) color (b) blue (c) : (d) ;
  21. 21.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 130px;
      padding: 30px;
      border: 3px solid black;
      margin: 10px;
    }
  22. 22.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>Good morning!</h2>
    <h2>Rain today</h2>
  23. 23.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
  24. 24.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 240px;
      padding: 10px;
      border: 5px solid black;
      margin: 0px;
    }
  25. 25.🔢 In a basic web page file, which comes first: “</html>” or “<html>”? (a) <html> (b) </html>
  26. 26.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 26px;
      }
    }
  27. 27.🔍 One closing tag is missing. Which one?
    <i>Fun facts</i>
    <em>I love mangoes.
    <small>The red kite</small>
    (a) </p> (b) </small> (c) </em> (d) </i>
  28. 28.📝 Which tag gives a form box a name you can click? (a) <hr> (b) <h1> (c) <title> (d) <label>
  29. 29.Which of these is an empty tag? (a) <br> (b) <h1> (c) <ul> (d) <p>
  30. 30.✍️ What is the selector in this CSS rule?
    p {
      font-weight: bold;
      background-color: yellow;
      padding: 8px;
      text-align: center;
    }
    (a) font-weight (b) .note (c) p (d) yellow
  31. 31.✍️ Which property is set to 10px in this rule?
    .box {
      text-align: center;
      color: red;
      margin: 10px;
      padding: 8px;
    }
    (a) font-weight (b) 10px (c) padding (d) margin
  32. 32.📄 Can HTML on its own count button clicks? (a) Yes (b) No
  33. 33.Which of these is a closing tag? (a) <p> (b) </p> (c) <title> (d) <li>
  34. 34.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h4> or <h5>? (a) <h4> (b) <h6> (c) <h5> (d) <h1>
  35. 35.📦 In the box model, which part is a solid or dotted edge? (a) content (b) border (c) margin (d) padding
  36. 36.🎯 What kind of selector is #end? (a) an element selector (b) a class selector (c) an id selector
  37. 37.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ul> (d) <ol>
  38. 38.🌍 Which one is the page’s address? (a) HTTPS (b) the browser (c) the URL (d) the server
  39. 39.📝 What do we need to write HTML? (a) a plain text editor (b) a microphone (c) a printer (d) a paintbrush
  40. 40.⚖️ What colour is the text of this element?
    <h1 class="star" id="intro">Hi</h1>
    CSS:
    .star { color: purple; }
    .star { color: blue; }
    (a) white (b) blue (c) red (d) purple

Answer key

  1. number
  2. False
  3. <title>
  4. orange
  5. True
  6. True
  7. href
  8. 36
  9. False
  10. False
  11. 36
  12. when if is false
  13. an element selector
  14. False
  15. an element selector
  16. rounds box corners
  17. not safe
  18. about.html
  19. if
  20. color
  21. 216
  22. 1
  23. a slash /
  24. 270
  25. <html>
  26. 26
  27. </em>
  28. <label>
  29. <br>
  30. p
  31. margin
  32. No
  33. </p>
  34. <h1>
  35. border
  36. an id selector
  37. <li>
  38. the URL
  39. a plain text editor
  40. blue

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