← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 197 · 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.📊 Where do <td> cells go? (a) inside a <tr> (b) inside a <p> (c) inside a <li> (d) inside the <head>
  2. 2.🔢 To build and share your first web page, which comes first: “write the HTML” or “add CSS styles”? (a) add CSS styles (b) write the HTML
  3. 3.✍️ How does a CSS comment start? (a) <!-- (b) // (c) /* (d) #
  4. 4.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
    (a) My pets (b) I love mangoes. (c) My best friend
  5. 5.🔤 In “HTML”, what do the letters HT stand for? (a) HyperText (b) Home Text (c) Hot Tags (d) High Tech
  6. 6.🔁 Which word runs code only when something is true? (a) let (b) for (c) if (d) log
  7. 7.🖌️ Where does the text sit on its line?
    li {
      font-size: 24px;
      color: red;
      text-align: center;
      background-color: yellow;
    }
    (a) on the left (b) on the right (c) in the middle
  8. 8.🚀 Which file should this code go in: h1 { font-size: 32px; } (a) index.html (b) script.js (c) style.css
  9. 9.🎯 Which CSS selector matches this element?
    <h2 class="note" id="intro">Hello</h2>
    (a) .big (b) #intro (c) #main (d) .intro
  10. 10.⚖️ What colour is the text of this element?
    <h1 class="star" id="hero">Hi</h1>
    CSS:
    h1 { color: yellow; }
    #hero { color: white; }
    (a) red (b) black (c) white (d) yellow
  11. 11.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 260px;
      justify-content: center;
    }
    Inside are 3 boxes, each 40px wide (no margins).
  12. 12.🧩 Which language changes the page live? (a) JavaScript (b) CSS (c) HTML
  13. 13.🔗 Which words do you click on?
    <a href="about.html">Maths fun</a>
    (a) about.html (b) Maths fun (c) href (d) Art corner
  14. 14.🔗 Which words do you click on?
    <a href="about.html">School news</a>
    (a) href (b) Take the quiz (c) about.html (d) School news
  15. 15.Which of these goes in the body? (a) <style> (b) <title> (c) <a> (d) <meta charset="utf-8">
  16. 16.⚖️ What colour is the text of this element?
    <p class="red" id="logo">Hi</p>
    CSS:
    .red { color: blue; }
    #logo { color: black; }
    (a) blue (b) black (c) red (d) purple
  17. 17.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 210px;
      justify-content: flex-start;
    }
    Inside are 2 boxes, each 100px wide (no margins).
  18. 18.🌍 What is the protocol in this URL?
    https://kids.example.org/index.html
    (a) kids.example.org (b) http (c) /index.html (d) https
  19. 19.🚀 What is the home page file of a website usually called? (a) home.css (b) main.png (c) index.html (d) start.js
  20. 20.⚡ Which JavaScript word repeats code? (a) for (b) if (c) alert() (d) console.log()
  21. 21.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 90px;
      padding: 10px;
      border: 5px solid black;
      margin: 20px;
    }
  22. 22.📋 Does this list show bullets or numbers?
    <ol>
      <li>Litchi</li>
      <li>Jamun</li>
    </ol>
    (a) numbers (b) bullets
  23. 23.🔗 Which words do you click on?
    <a href="games.html">About us</a>
    (a) About us (b) games.html (c) Contact us (d) href
  24. 24.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) alt (c) width (d) src
  25. 25.🎯 Which element does the selector span style? (a) <p> (b) <h2 id="hero"> (c) <h1 class="big"> (d) <span class="big">
  26. 26.Which of these is an empty tag? (a) <ul> (b) <h1> (c) <img> (d) <p>
  27. 27.🛡️ Should you share your password with your best friend? (a) Yes (b) No
  28. 28.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <br> (d) <p>
  29. 29.✍️ How many declarations (property: value pairs) are in this rule?
    h1 {
      font-size: 20px;
      color: red;
    }
  30. 30.🔍 Which is the odd one out? (a) answers page requests (b) sends pages over the net (c) colours code to help us (d) stores a website’s files
  31. 31.📱 Which tag helps phones show a page at the right size? (a) the viewport meta tag (b) the br tag (c) the hr tag (d) the title tag
  32. 32.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  33. 33.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  34. 34.✍️ How many declarations (property: value pairs) are in this rule?
    li {
      color: red;
    }
  35. 35.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>My pets</p>
    <h2>Hello, world!</h2>
  36. 36.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="sport"> Football
      <input type="checkbox" name="sport"> Cricket
      <input type="checkbox" name="sport"> Chess
      <input type="checkbox" name="sport"> Kabaddi
    </form>
  37. 37.✍️ Which property is set to red in this rule?
    li {
      color: red;
      margin: 10px;
    }
    (a) red (b) text-align (c) color (d) font-size
  38. 38.🎨 What does CSS stand for? (a) Cascading Style Sheets (b) Colourful Site Styles (c) Computer Style Sheets (d) Creative Sheet System
  39. 39.🧭 Which semantic tag holds the main content? (a) <nav> (b) <article> (c) <main> (d) <aside>
  40. 40.📊 Which tag gives the table a title? (a) <td> (b) <th> (c) <caption> (d) <tr>

Answer key

  1. inside a <tr>
  2. write the HTML
  3. /*
  4. I love mangoes.
  5. HyperText
  6. if
  7. in the middle
  8. style.css
  9. #intro
  10. white
  11. 70
  12. JavaScript
  13. Maths fun
  14. School news
  15. <a>
  16. black
  17. 10
  18. https
  19. index.html
  20. for
  21. 160
  22. numbers
  23. About us
  24. alt
  25. <span class="big">
  26. <img>
  27. No
  28. <h1>
  29. 2
  30. colours code to help us
  31. the viewport meta tag
  32. <ul>
  33. 2
  34. 1
  35. 2
  36. 4
  37. color
  38. Cascading Style Sheets
  39. <main>
  40. <caption>

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