← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 238 · 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.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  2. 2.⚖️ What colour is the text of this element?
    <h2 class="note" id="hero">Hi</h2>
    CSS:
    .note { color: yellow; }
    .note { color: black; }
    (a) white (b) yellow (c) green (d) black
  3. 3.🔍 One closing tag is missing. Which one?
    <strong>My pets</strong>
    <small>Our school trip
    <h1>My best friend</h1>
    (a) </small> (b) </strong> (c) </em> (d) </h1>
  4. 4.📝 Which input type is for an email address? (a) submit (b) radio (c) email (d) password
  5. 5.🧩 Which language sets colours and fonts? (a) HTML (b) CSS (c) JavaScript
  6. 6.🔢 When you open a web page, which comes first: “DNS finds the server” or “the server sends files”? (a) DNS finds the server (b) the server sends files
  7. 7.🔗 Which words do you click on?
    <a href="https://example.com">Contact us</a>
    (a) Visit the site (b) href (c) https://example.com (d) Contact us
  8. 8.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  9. 9.🔍 One closing tag is missing. Which one?
    <h3>Hello, world!</h3>
    <h1>Fun facts
    <u>My pets</u>
    (a) </h1> (b) </h3> (c) </u> (d) </strong>
  10. 10.🔍 Which is the odd one out? (a) gives the page structure (b) puts a picture on a page (c) counts down a timer (d) makes headings and lists
  11. 11.🧭 Which semantic tag is the page’s key part? (a) <article> (b) <main> (c) <aside> (d) <nav>
  12. 12.🛡️ Should you share your password with your best friend? (a) Yes (b) No
  13. 13.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the first one (b) the shorter one (c) the later one (d) neither
  14. 14.⚡ What number does this code print?
    let a = 11;
    let b = 3;
    console.log(a * b);
  15. 15.🎯 Which element does the selector h1 style? (a) <li class="menu"> (b) <h2> (c) <h1 class="menu"> (d) <div id="top">
  16. 16.🔁 Which word runs code only when something is true? (a) let (b) if (c) log (d) for
  17. 17.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  18. 18.True or false: HTML changes the text size. (a) False (b) True
  19. 19.✍️ Which property is set to 10px in this rule?
    .box {
      margin: 10px;
      color: red;
      font-weight: bold;
    }
    (a) font-weight (b) 10px (c) margin (d) padding
  20. 20.📦 In the box model, which part is the gap to other boxes? (a) padding (b) border (c) content (d) margin
  21. 21.📊 Which tag holds the whole table? (a) <td> (b) <caption> (c) <th> (d) <table>
  22. 22.What is <input type="checkbox"> for? (a) lets you pick only one (b) hides what you type (c) picks a day (d) lets you tick many
  23. 23.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Guava</li>
    </ol>
  24. 24.🔁 How many numbers does this code print?
    for (let i = 0; i < 8; i = i + 3) {
      console.log(i);
    }
  25. 25.🔗 Which address opens when you click this link?
    <a href="maths.html">Contact us</a>
    (a) art.html (b) news.html (c) maths.html (d) Contact us
  26. 26.📱 Responsive design means a page ___. (a) never changes (b) fits every screen (c) is only for laptops (d) has no pictures
  27. 27.✍️ What is the selector in this CSS rule?
    body {
      text-align: center;
      margin: 10px;
    }
    (a) text-align (b) 10px (c) .box (d) body
  28. 28.📊 Which tag makes a heading cell? (a) <caption> (b) <td> (c) <table> (d) <th>
  29. 29.⚖️ What colour is the text of this element?
    <h1 class="box" id="top">Hi</h1>
    CSS:
    #top { color: green; }
    #top { color: red; }
    (a) green (b) white (c) orange (d) red
  30. 30.True or false: a code editor answers page requests. (a) False (b) True
  31. 31.🌈 Which colour is #00ff00? (a) cyan (b) yellow (c) bright green (d) red
  32. 32.🌗 Is white on dark blue easy or hard to read? (a) easy to read (b) hard to read
  33. 33.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ol>
  34. 34.🔗 Which address opens when you click this link?
    <a href="https://example.com">Art corner</a>
    (a) maths.html (b) Art corner (c) art.html (d) https://example.com
  35. 35.🔁 What does this code print?
    let marks = 46;
    if (marks < 35) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Pass (b) Try again
  36. 36.🔤 In “HTML”, what does the L stand for? (a) Language (b) Laptop (c) Line (d) Link
  37. 37.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 60px;
      padding: 30px;
      border: 1px solid black;
      margin: 10px;
    }
  38. 38.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
    (a) A tiger asleep (b) map.png (c) kite.png (d) tiger.jpg
  39. 39.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>The red kite</h2>
    <h2>Fun facts</h2>
  40. 40.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Litchi</td><td>Jamun</td></tr>
      <tr><td>Orange</td><td>Mango</td></tr>
    </table>

Answer key

  1. Yes
  2. black
  3. </small>
  4. email
  5. CSS
  6. DNS finds the server
  7. Contact us
  8. an empty tag
  9. </h1>
  10. counts down a timer
  11. <main>
  12. No
  13. the later one
  14. 33
  15. <h1 class="menu">
  16. if
  17. No
  18. False
  19. margin
  20. margin
  21. <table>
  22. lets you tick many
  23. 4
  24. 3
  25. maths.html
  26. fits every screen
  27. body
  28. <th>
  29. red
  30. False
  31. bright green
  32. easy to read
  33. 3
  34. https://example.com
  35. Try again
  36. Language
  37. 142
  38. tiger.jpg
  39. 1
  40. 3

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