← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 9 · 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.🛡️ Online: is it safe to keep passwords secret? (a) not safe (b) safe
  2. 2.🚀 Which file should this code go in: .box { padding: 8px; } (a) style.css (b) index.html (c) script.js
  3. 3.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 90px;
      padding: 20px;
      border: 2px solid black;
      margin: 20px;
    }
  4. 4.🌍 Which one scrambles data on its way? (a) the browser (b) the server (c) HTTPS (d) the URL
  5. 5.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Orange</td><td>Orange</td><td>Papaya</td><td>Mango</td></tr>
    </table>
  6. 6.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 90px;
      padding: 30px;
      border: 2px solid black;
      margin: 10px;
    }
  7. 7.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) in a big heading (d) on the browser tab
  8. 8.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  9. 9.📱 The screen is 320px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 12px;
      }
    }
    (a) No (b) Yes
  10. 10.✍️ What is the selector in this CSS rule?
    body {
      text-align: center;
      padding: 8px;
      font-style: italic;
    }
    (a) .box (b) body (c) 8px (d) text-align
  11. 11.🔁 Which word runs code only when something is true? (a) log (b) for (c) if (d) let
  12. 12.📊 How many rows does this table have?
    <table>
      <tr><td>Guava</td><td>Jamun</td></tr>
      <tr><td>Mango</td><td>Grapes</td></tr>
      <tr><td>Litchi</td><td>Guava</td></tr>
      <tr><td>Mango</td><td>Papaya</td></tr>
    </table>
  13. 13.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  14. 14.Which of these is true of <nav>? (a) sits at the very top (b) holds the menu of links (c) holds copyright notes (d) holds extra side notes
  15. 15.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is free (b) the site is a game (c) the site is fast (d) the data is scrambled
  16. 16.🖌️ What colour is behind the letters?
    li {
      background-color: orange;
      font-size: 28px;
      text-align: right;
      color: blue;
    }
    (a) orange (b) blue (c) black
  17. 17.Which of these is true of <article>? (a) sits at the bottom (b) holds copyright notes (c) helps you move around (d) holds a news story
  18. 18.True or false: in <img>, alt sets how tall it is. (a) False (b) True
  19. 19.🖌️ Where does the text sit on its line?
    p {
      color: purple;
      font-size: 28px;
      text-align: center;
      background-color: orange;
    }
    (a) on the left (b) on the right (c) in the middle
  20. 20.♿ Does this help everyone, or make the page harder to use: tiny grey text? (a) makes it harder (b) helps everyone
  21. 21.True or false: a web server is where we type code. (a) True (b) False
  22. 22.✍️ What is the selector in this CSS rule?
    body {
      text-align: center;
      padding: 8px;
      background-color: yellow;
      width: 300px;
    }
    (a) text-align (b) .box (c) 8px (d) body
  23. 23.Which of these is a strong password? (a) riya2014 (b) 111111 (c) S0lar!Pen#8 (d) qwerty
  24. 24.Which colour pair is easy to read? (a) light grey on white (b) pink on red (c) dark grey on white (d) yellow on white
  25. 25.What is <input type="text"> for? (a) hides what you type (b) sends the form (c) is for one line of words (d) is for an email address
  26. 26.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
    <!-- <p>Fun facts</p> -->
  27. 27.✍️ In color: blue; which part is the property? (a) : (b) color (c) blue (d) ;
  28. 28.🔍 Which is the odd one out? (a) counts down a timer (b) changes the text size (c) reacts to a button click (d) shows a pop-up message
  29. 29.📊 How many rows does this table have?
    <table>
      <tr><td>Papaya</td><td>Jamun</td><td>Orange</td></tr>
      <tr><td>Guava</td><td>Jamun</td><td>Orange</td></tr>
      <tr><td>Papaya</td><td>Jamun</td><td>Litchi</td></tr>
    </table>
  30. 30.🔍 Which line is missing its closing tag?
    line 1: <small>My pets
    line 2: <h3>My best friend</h3>
    line 3: <b>Good morning!</b>
    (a) line 3 (b) line 2 (c) line 1
  31. 31.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow</p>
  32. 32.🏷️ Every HTML tag starts with which sign? (a) ( (b) < (c) { (d) [
  33. 33.📝 What does <br> do? (a) makes a list (b) makes text bold (c) adds a picture (d) starts a new line
  34. 34.⚖️ Which selector is the strongest? (a) an element selector (b) a class selector (c) an id selector
  35. 35.Which of these is an opening tag? (a) </body> (b) </h1> (c) <h1> (d) </li>
  36. 36.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
  37. 37.🔗 Which words do you click on?
    <a href="about.html">Art corner</a>
    (a) Art corner (b) about.html (c) href (d) School news
  38. 38.🌍 What is the protocol in this URL?
    https://learn.example.com/about.html
    (a) http (b) https (c) learn.example.com (d) /about.html
  39. 39.🔢 To build and share your first web page, which comes first: “write the HTML” or “test in a browser”? (a) write the HTML (b) test in a browser
  40. 40.🎯 Which CSS selector matches this element?
    <span class="red" id="end">Hello</span>
    (a) .end (b) span (c) p (d) #red

Answer key

  1. safe
  2. style.css
  3. 174
  4. HTTPS
  5. 4
  6. 174
  7. on the browser tab
  8. True
  9. Yes
  10. body
  11. if
  12. 4
  13. in a new tab
  14. holds the menu of links
  15. the data is scrambled
  16. orange
  17. holds a news story
  18. False
  19. in the middle
  20. makes it harder
  21. False
  22. body
  23. S0lar!Pen#8
  24. dark grey on white
  25. is for one line of words
  26. 1
  27. color
  28. changes the text size
  29. 3
  30. line 1
  31. 2
  32. <
  33. starts a new line
  34. an id selector
  35. <h1>
  36. <a>
  37. Art corner
  38. https
  39. write the HTML
  40. span

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