← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 675 · 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 list tag is one item of a list? (a) <li> (b) <ol> (c) <ul>
  2. 2.True or false: <h1> has a closing tag. (a) True (b) False
  3. 3.✍️ How many declarations (property: value pairs) are in this rule?
    p {
      font-style: italic;
      background-color: yellow;
    }
  4. 4.🧭 Is <span> semantic or not semantic? (a) semantic (b) not semantic
  5. 5.🔁 What does this code print?
    let age = 10;
    if (age >= 5) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  6. 6.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <style> (c) <a> (d) <title>
  7. 7.🌍 What is the protocol in this URL?
    http://learn.example.com/art/gallery.html
    (a) http (b) learn.example.com (c) /art/gallery.html (d) https
  8. 8.⚡ Which JavaScript word shows a pop-up box? (a) console.log() (b) alert() (c) let (d) if
  9. 9.Which of these is a strong password? (a) Rain#Drop_42! (b) abcd1234 (c) riya2014 (d) 123456
  10. 10.True or false: <ul> has a closing tag. (a) True (b) False
  11. 11.🔍 One closing tag is missing. Which one?
    <b>Fun facts</b>
    <i>I love mangoes.</i>
    <p>Cricket is fun.
    (a) </i> (b) </b> (c) </h2> (d) </p>
  12. 12.🔍 Which is the odd one out? (a) changes the text size (b) sets colours and fonts (c) adds space around boxes (d) reacts to a button click
  13. 13.🧩 Which language puts a picture on a page? (a) CSS (b) JavaScript (c) HTML
  14. 14.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>Fun facts</p>
    <!-- <p>Our school trip</p> -->
  15. 15.🧩 Which language makes headings and lists? (a) JavaScript (b) HTML (c) CSS
  16. 16.True or false: li is an element selector. (a) True (b) False
  17. 17.🔢 To build and share your first web page, what comes right after “write the HTML”? (a) publish it online (b) test in a browser (c) plan what to show (d) add CSS styles
  18. 18.True or false: to ask before downloading is not safe. (a) True (b) False
  19. 19.♿ A part of the page is under a <h2> heading. Which tag should its sub-heading use? (a) <h4> (b) <h1> (c) <h3> (d) <h6>
  20. 20.🌈 Which hex code is blue? (a) #000000 (b) #0000ff (c) #00ffff (d) #00ff00
  21. 21.🎯 How many elements on a page should have the same id? (a) 2 (b) 1 (c) any number (d) 5
  22. 22.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 200px;
      justify-content: flex-start;
    }
    Inside are 2 boxes, each 80px wide (no margins).
  23. 23.🔍 One closing tag is missing. Which one?
    <u>Rain today
    <b>I love mangoes.</b>
    <h1>Fun facts</h1>
    (a) </b> (b) </small> (c) </h1> (d) </u>
  24. 24.📱 The screen is 414px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 18px;
      }
    }
  25. 25.🔁 What does this code print?
    let age = 36;
    if (age > 39) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  26. 26.📄 Which part holds everything you see on the page? (a) the title (b) the head (c) the doctype (d) the body
  27. 27.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  28. 28.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 22px;
      }
    }
  29. 29.🌍 What is the protocol in this URL?
    https://www.example.net/index.html
    (a) https (b) www.example.net (c) http (d) /index.html
  30. 30.🧭 Is <div> semantic or not semantic? (a) not semantic (b) semantic
  31. 31.🛡️ Is it safe to use the same password on every site? (a) No (b) Yes
  32. 32.🔁 Which word runs code only when something is true? (a) let (b) for (c) if (d) log
  33. 33.🖌️ What colour is behind the letters?
    h1 {
      background-color: red;
      color: yellow;
      font-size: 36px;
      text-align: left;
    }
    (a) red (b) purple (c) yellow
  34. 34.📝 How many <input> tags are in this form?
    <form>
      <input type="number">
      <input type="date">
      <input type="text">
      <input type="email">
      <input type="submit" value="Send">
    </form>
  35. 35.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
    (a) Our school trip (b) Cricket is fun. (c) I love mangoes.
  36. 36.✍️ How many declarations (property: value pairs) are in this rule?
    #top {
      border: 2px solid;
    }
  37. 37.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
  38. 38.💪 Which justify-content value equal gaps, none at ends? (a) center (b) flex-start (c) flex-end (d) space-between
  39. 39.True or false: a code editor opens web pages for us. (a) True (b) False
  40. 40.True or false: <nav> holds one blog post. (a) False (b) True

Answer key

  1. <li>
  2. True
  3. 2
  4. not semantic
  5. teen
  6. <a>
  7. http
  8. alert()
  9. Rain#Drop_42!
  10. True
  11. </p>
  12. reacts to a button click
  13. HTML
  14. 2
  15. HTML
  16. True
  17. add CSS styles
  18. False
  19. <h3>
  20. #0000ff
  21. 1
  22. 40
  23. </u>
  24. 18
  25. child
  26. the body
  27. No
  28. 22
  29. https
  30. not semantic
  31. No
  32. if
  33. red
  34. 5
  35. I love mangoes.
  36. 1
  37. an attribute
  38. space-between
  39. False
  40. False

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