← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 205 · 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.What does justify-content: space-between do? (a) equal gaps, none at ends (b) puts boxes in the middle (c) packs boxes at the start (d) packs boxes at the end
  2. 2.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>My pets</h2>
    <p>I love mangoes.</p>
  3. 3.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <h2>Our school trip</h2>
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    <h2>My pets</h2>
  4. 4.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
  5. 5.True or false: <main> holds the main content. (a) False (b) True
  6. 6.🌈 Which hex code is yellow? (a) #ff00ff (b) #ff0000 (c) #ffffff (d) #ffff00
  7. 7.🔢 To build and share your first web page, which comes first: “add CSS styles” or “plan what to show”? (a) add CSS styles (b) plan what to show
  8. 8.⚡ Which JavaScript word repeats code? (a) alert() (b) for (c) let (d) if
  9. 9.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h4>? (a) <h4> (b) <h2> (c) <h3> (d) <h1>
  10. 10.True or false: JavaScript makes a link. (a) True (b) False
  11. 11.Which of these is a weak password? (a) Blue@Tiger_74 (b) Kite_Fl1es@Dawn (c) Mango#Kite29! (d) 123456
  12. 12.🔢 When you open a web page, which comes first: “the browser shows it” or “the server sends files”? (a) the server sends files (b) the browser shows it
  13. 13.True or false: <meta> is an empty tag. (a) True (b) False
  14. 14.🔁 When does the else part run? (a) never (b) when if is false (c) when if is true (d) always
  15. 15.🔁 Which loop repeats code a set number of times? (a) else (b) for (c) if (d) let
  16. 16.🧭 Who is helped most by semantic tags? (a) nobody (b) only the printer (c) screen-reader users (d) only the server
  17. 17.🌍 Which one is the page’s address? (a) the server (b) HTTPS (c) the browser (d) the URL
  18. 18.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  19. 19.✍️ How many declarations (property: value pairs) are in this rule?
    .box {
      padding: 8px;
      text-align: center;
    }
  20. 20.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is a game (b) the site is free (c) the data is scrambled (d) the site is fast
  21. 21.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
    (a) bullets (b) numbers
  22. 22.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  23. 23.Which of these is true of a web browser? (a) turns HTML into a page (b) shows line numbers (c) saves our .html files (d) stores a website’s files
  24. 24.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 270px;
      justify-content: space-between;
    }
    Inside are 3 boxes, each 50px wide (no margins).
  25. 25.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 8; i++) {
      total = total + i;
    }
    console.log(total);
  26. 26.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>I love mangoes.</h3>
    <p>I love mangoes.</p>
    <h4>Hello, world!</h4>
    <p>Cricket is fun.</p>
  27. 27.♿ Is this heading order correct (no level skipped)?
    <h1> → <h1> → <h2> → <h4>
    (a) No (b) Yes
  28. 28.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 110px;
      padding: 25px;
      border: 2px solid black;
      margin: 20px;
    }
  29. 29.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>Rain today</h3>
    <p>Our school trip</p>
    <h4>I love mangoes.</h4>
  30. 30.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
  31. 31.🧩 Which language changes the page live? (a) JavaScript (b) CSS (c) HTML
  32. 32.🔢 To build and share your first web page, which comes FIRST? (a) publish it online (b) plan what to show (c) add CSS styles (d) test in a browser
  33. 33.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Link (c) Line (d) Language
  34. 34.True or false: <a href="a.html">Go</a> goes in script.js. (a) True (b) False
  35. 35.⚖️ What colour is the text of this element?
    <h1 class="menu" id="top">Hi</h1>
    CSS:
    #top { color: yellow; }
    .menu { color: red; }
    h1 { color: blue; }
    (a) red (b) blue (c) white (d) yellow
  36. 36.⚖️ What colour is the text of this element?
    <h1 class="red" id="logo">Hi</h1>
    CSS:
    .red { color: yellow; }
    #logo { color: black; }
    (a) black (b) red (c) yellow (d) orange
  37. 37.🌍 What do we call the computer that stores a website? (a) a keyboard (b) a printer (c) a mouse (d) a server
  38. 38.✍️ What is the selector in this CSS rule?
    #top {
      border: 2px solid;
      font-weight: bold;
      font-style: italic;
      width: 300px;
    }
    (a) li (b) border (c) #top (d) bold
  39. 39.💾 A web page file usually ends with which extension? (a) .png (b) .txt (c) .html (d) .mp3
  40. 40.🔁 What does this code print?
    let marks = 44;
    if (marks < 29) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Pass (b) Try again

Answer key

  1. equal gaps, none at ends
  2. 2
  3. 4
  4. <ul>
  5. True
  6. #ffff00
  7. plan what to show
  8. for
  9. <h4>
  10. False
  11. 123456
  12. the server sends files
  13. True
  14. when if is false
  15. for
  16. screen-reader users
  17. the URL
  18. -->
  19. 2
  20. the data is scrambled
  21. numbers
  22. a closing tag
  23. turns HTML into a page
  24. 60
  25. 36
  26. 3
  27. No
  28. 204
  29. 3
  30. <ol>
  31. JavaScript
  32. plan what to show
  33. Language
  34. False
  35. yellow
  36. black
  37. a server
  38. #top
  39. .html
  40. Try again

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