← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 692 · 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 one is the page’s address? (a) the server (b) HTTPS (c) the browser (d) the URL
  2. 2.True or false: <ul> is an empty tag. (a) False (b) True
  3. 3.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 8; i++) {
      total = total + i;
    }
    console.log(total);
  4. 4.True or false: <input type="checkbox"> lets you tick many. (a) False (b) True
  5. 5.📊 How many cells does this table have in all?
    <table>
      <tr><td>Mango</td><td>Guava</td></tr>
      <tr><td>Papaya</td><td>Guava</td></tr>
    </table>
  6. 6.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 400px;
      justify-content: flex-start;
    }
    Inside are 4 boxes, each 80px wide (no margins).
  7. 7.True or false: CSS reacts to a button click. (a) False (b) True
  8. 8.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 80px;
      padding: 10px;
      border: 1px solid black;
      margin: 10px;
    }
  9. 9.True or false: in <img>, alt names the picture file. (a) False (b) True
  10. 10.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="100">
    (a) The full moon (b) moon.png (c) Our school bus (d) width
  11. 11.📝 Which input type hides what you type? (a) date (b) password (c) email (d) text
  12. 12.Which of these is true of a web browser? (a) opens web pages for us (b) is where we type code (c) answers page requests (d) stores a website’s files
  13. 13.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) Cricket is fun. (c) Hello, world!
  14. 14.🔗 Which address opens when you click this link?
    <a href="contact.html">About us</a>
    (a) contact.html (b) About us (c) maths.html (d) https://example.com
  15. 15.⚖️ What colour is the text of this element?
    <h2 class="menu" id="end">Hi</h2>
    CSS:
    h2 { color: blue; }
    h2 { color: orange; }
    (a) purple (b) orange (c) black (d) blue
  16. 16.🎯 Which element does the selector .star style? (a) <p class="note"> (b) <span class="star"> (c) <span class="menu"> (d) <span id="star">
  17. 17.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 5; i = i + 2) {
      console.log(i);
    }
  18. 18.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h1> (d) <h6>
  19. 19.🔢 To build and share your first web page, which comes first: “plan what to show” or “write the HTML”? (a) plan what to show (b) write the HTML
  20. 20.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Hello, world!</p>
    <p>My best friend</p>
  21. 21.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  22. 22.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) neither (c) the first one (d) the later one
  23. 23.🖌️ Which CSS property sets the letter colour? (a) font-family (b) color (c) font-weight (d) font-size
  24. 24.♿ Who uses a screen reader? (a) only coders (b) only robots (c) people who are blind (d) only teachers
  25. 25.🔍 Which is the odd one out? (a) shows line numbers (b) shows pages from the web (c) has an address bar (d) opens web pages for us
  26. 26.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  27. 27.🧩 Which language changes the page live? (a) HTML (b) CSS (c) JavaScript
  28. 28.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt
  29. 29.🔍 Which is the odd one out? (a) makes a link (b) makes a form box (c) checks a quiz answer (d) makes headings and lists
  30. 30.🌍 What does a web address (URL) tell the browser? (a) your password (b) where the page is (c) how old you are (d) the page colour
  31. 31.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
  32. 32.What does font-family do? (a) sets the letter colour (b) picks the font style (c) colours behind the text (d) makes letters bigger
  33. 33.🔁 What does this code print?
    let temp = 34;
    if (temp >= 26) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Hot (b) Cool
  34. 34.✍️ What value is given to background-color in this rule?
    body {
      background-color: yellow;
      font-style: italic;
    }
    (a) 10px (b) yellow (c) 8px (d) background-color
  35. 35.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
  36. 36.True or false: <li> is an unordered list. (a) True (b) False
  37. 37.🔁 What does this code print?
    let age = 15;
    if (age < 29) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  38. 38.🔤 In “HTML”, what does the L stand for? (a) Line (b) Link (c) Language (d) Laptop
  39. 39.🖼️ Which attribute of <img> names the picture file? (a) src (b) width (c) alt (d) height
  40. 40.🧭 Why use <nav> instead of <div> for a menu? (a) it tells its meaning (b) it adds pictures (c) it makes text red (d) it loads faster

Answer key

  1. the URL
  2. False
  3. 36
  4. True
  5. 4
  6. 80
  7. False
  8. 102
  9. False
  10. The full moon
  11. password
  12. opens web pages for us
  13. Cricket is fun.
  14. contact.html
  15. orange
  16. <span class="star">
  17. 4
  18. <h6>
  19. plan what to show
  20. 1
  21. an empty tag
  22. the later one
  23. color
  24. people who are blind
  25. shows line numbers
  26. an empty tag
  27. JavaScript
  28. href
  29. checks a quiz answer
  30. where the page is
  31. 1
  32. picks the font style
  33. Hot
  34. yellow
  35. <a>
  36. False
  37. teen
  38. Language
  39. src
  40. it tells its meaning

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