← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 671 · 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.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Jamun</li>
    </ul>
    (a) bullets (b) numbers
  2. 2.⚖️ Which selector is the weakest? (a) a class selector (b) an id selector (c) an element selector
  3. 3.📊 Which tag makes one data cell? (a) <caption> (b) <table> (c) <td> (d) <tr>
  4. 4.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 200px;
      justify-content: flex-end;
    }
    Inside are 2 boxes, each 80px wide (no margins).
  5. 5.🚀 What is the home page file of a website usually called? (a) index.html (b) main.png (c) start.js (d) home.css
  6. 6.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Match report (b) We won by 5 runs. (c) Class 7 Blog (d) index.html
  7. 7.🔗 Which address opens when you click this link?
    <a href="https://example.com">Visit the site</a>
    (a) Visit the site (b) maths.html (c) art.html (d) https://example.com
  8. 8.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>My pets</p>
    <h2>Our school trip</h2>
  9. 9.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 120px;
      justify-content: space-between;
    }
    Inside are 2 boxes, each 50px wide (no margins).
  10. 10.🧭 Why use <nav> instead of <div> for a menu? (a) it makes text red (b) it tells its meaning (c) it loads faster (d) it adds pictures
  11. 11.🖌️ Which CSS property makes letters bigger? (a) color (b) font-size (c) font-weight (d) background-color
  12. 12.🔁 How many times does this code print “Hello”?
    for (let i = 2; i <= 4; i++) {
      console.log("Hello");
    }
  13. 13.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 210px;
      padding: 15px;
      border: 1px solid black;
      margin: 20px;
    }
  14. 14.🌗 Is dark grey on white easy or hard to read? (a) hard to read (b) easy to read
  15. 15.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Grapes</td><td>Litchi</td><td>Orange</td></tr>
      <tr><td>Guava</td><td>Grapes</td><td>Orange</td></tr>
    </table>
  16. 16.🚀 Which file should this code go in: alert("Hi"); (a) style.css (b) script.js (c) index.html
  17. 17.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
    <!-- <p>The red kite</p> -->
  18. 18.✍️ How many declarations (property: value pairs) are in this rule?
    body {
      font-style: italic;
      border: 2px solid;
      font-weight: bold;
    }
  19. 19.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  20. 20.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Banana</td><td>Papaya</td></tr>
    </table>
  21. 21.Which colour pair is hard to read? (a) black on white (b) blue on purple (c) yellow on black (d) dark grey on white
  22. 22.Which of these is a weak password? (a) Mango#Kite29! (b) S0lar!Pen#8 (c) Blue@Tiger_74 (d) abcd1234
  23. 23.True or false: HTML on its own can count button clicks. (a) True (b) False
  24. 24.Which of these is safe to do online? (a) meet an online stranger (b) click prize links (c) post your home address (d) tell a trusted adult
  25. 25.True or false: .note is a class selector. (a) False (b) True
  26. 26.🚀 You change your code. What should you do to see the change? (a) switch off the PC (b) delete the file (c) rename the folder (d) save and refresh
  27. 27.♿ What does good colour contrast mean? (a) no colours at all (b) only red text (c) text stands out clearly (d) many bright colours
  28. 28.🧭 Which semantic tag sits at the very top? (a) <article> (b) <aside> (c) <main> (d) <header>
  29. 29.🔒 Is the connection to this address scrambled (encrypted)?
    https://kids.example.org/news/today.html
    (a) Yes (b) No
  30. 30.True or false: <b> is an empty tag. (a) True (b) False
  31. 31.♿ Does this help everyone, or make the page harder to use: label every form box? (a) makes it harder (b) helps everyone
  32. 32.🔗 Which words do you click on?
    <a href="about.html">Play games</a>
    (a) href (b) Play games (c) About us (d) about.html
  33. 33.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
  34. 34.🔗 Which address opens when you click this link?
    <a href="https://example.com">Contact us</a>
    (a) maths.html (b) Contact us (c) https://example.com (d) art.html
  35. 35.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="400">
  36. 36.✍️ In color: blue; which part is the property? (a) ; (b) : (c) color (d) blue
  37. 37.📱 Responsive design means a page ___. (a) has no pictures (b) is only for laptops (c) fits every screen (d) never changes
  38. 38.🔁 How many times does this code print “Hello”?
    for (let i = 3; i <= 11; i++) {
      console.log("Hello");
    }
  39. 39.Which of these is a strong password? (a) qwerty (b) riya2014 (c) abcd1234 (d) Rain#Drop_42!
  40. 40.⚡ Which JavaScript word shows a pop-up box? (a) alert() (b) console.log() (c) for (d) if

Answer key

  1. bullets
  2. an element selector
  3. <td>
  4. 40
  5. index.html
  6. Class 7 Blog
  7. https://example.com
  8. 2
  9. 20
  10. it tells its meaning
  11. font-size
  12. 3
  13. 242
  14. easy to read
  15. 9
  16. script.js
  17. 2
  18. 3
  19. has a closing tag
  20. 2
  21. blue on purple
  22. abcd1234
  23. False
  24. tell a trusted adult
  25. True
  26. save and refresh
  27. text stands out clearly
  28. <header>
  29. Yes
  30. False
  31. helps everyone
  32. Play games
  33. False
  34. https://example.com
  35. 400
  36. color
  37. fits every screen
  38. 9
  39. Rain#Drop_42!
  40. alert()

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