← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 302 · 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.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 240px;
      justify-content: space-between;
    }
    Inside are 3 boxes, each 60px wide (no margins).
  2. 2.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 280px;
      padding: 20px;
      border: 5px solid black;
      margin: 5px;
    }
  3. 3.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
  4. 4.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 170px;
      justify-content: space-between;
    }
    Inside are 3 boxes, each 50px wide (no margins).
  5. 5.🌈 In #c00000 the red part is the hex number c0. What is it as a normal number?
  6. 6.🔍 Which line is missing its closing tag?
    line 1: <small>Hello, world!</small>
    line 2: <u>I love mangoes.
    line 3: <h3>Rain today</h3>
    (a) line 1 (b) line 2 (c) line 3
  7. 7.📝 What does <p> make? (a) a picture (b) a table (c) a link (d) a paragraph
  8. 8.💪 Which flexbox property picks row or column? (a) gap (b) justify-content (c) flex-direction (d) align-items
  9. 9.🔗 Which address opens when you click this link?
    <a href="quiz.html">Visit the site</a>
    (a) games.html (b) quiz.html (c) Visit the site (d) about.html
  10. 10.🔗 Which words do you click on?
    <a href="contact.html">Visit the site</a>
    (a) href (b) Visit the site (c) Maths fun (d) contact.html
  11. 11.🔗 Where does this link open?
    <a href="https://example.com">About us</a>
    (a) in the same tab (b) in a new tab
  12. 12.🧭 Why use <nav> instead of <div> for a menu? (a) it adds pictures (b) it loads faster (c) it tells its meaning (d) it makes text red
  13. 13.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h4> or <h3>? (a) <h1> (b) <h3> (c) <h5> (d) <h4>
  14. 14.🌍 What is the protocol in this URL?
    https://www.example.com/news/today.html
    (a) www.example.com (b) https (c) /news/today.html (d) http
  15. 15.📱 The screen is 1100px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 14px;
      }
    }
    (a) No (b) Yes
  16. 16.🖌️ Which CSS property makes the text bold? (a) background-color (b) font-size (c) font-weight (d) color
  17. 17.⚖️ What colour is the text of this element?
    <p class="red" id="end">Hi</p>
    CSS:
    .red { color: white; }
    #end { color: orange; }
    p { color: purple; }
    (a) red (b) purple (c) white (d) orange
  18. 18.📝 How many <input> tags are in this form?
    <form>
      <input type="text">
      <input type="password">
      <input type="submit" value="Send">
    </form>
  19. 19.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
  20. 20.⚡ What number does this code print?
    let a = 33;
    let b = 16;
    console.log(a - b);
  21. 21.🔗 Which words do you click on?
    <a href="contact.html">Play games</a>
    (a) contact.html (b) href (c) About us (d) Play games
  22. 22.⚖️ What colour is the text of this element?
    <p class="big" id="end">Hi</p>
    CSS:
    .big { color: red; }
    #end { color: purple; }
    p { color: blue; }
    (a) purple (b) blue (c) yellow (d) red
  23. 23.🧭 Who is helped most by semantic tags? (a) screen-reader users (b) only the printer (c) only the server (d) nobody
  24. 24.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
  25. 25.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Banana</li>
    </ul>
    (a) numbers (b) bullets
  26. 26.🌐 Which one sends pages over the net? (a) a code editor (b) a web server (c) a web browser
  27. 27.🚀 Which file should this code go in: <p>Hello!</p> (a) index.html (b) script.js (c) style.css
  28. 28.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  29. 29.Which of these is an empty tag? (a) <h1> (b) <br> (c) <p> (d) <li>
  30. 30.📱 The screen is 1366px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 20px;
      }
    }
    (a) Yes (b) No
  31. 31.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h4>? (a) <h1> (b) <h2> (c) <h4> (d) <h6>
  32. 32.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Banana</li>
    </ol>
  33. 33.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
    (a) tiger.jpg (b) kite.png (c) map.png (d) A tiger asleep
  34. 34.Which of these is safe to do online? (a) check for https first (b) share your OTP (c) type a password on http (d) put secrets in comments
  35. 35.⚡ Which tag holds JavaScript in a page? (a) <script> (b) <js> (c) <code> (d) <style>
  36. 36.📛 In <a href="x.html">, what is href? (a) an attribute (b) an element name (c) a closing tag (d) a comment
  37. 37.📝 How many <input> tags are in this form?
    <form>
      <input type="email">
      <input type="checkbox">
      <input type="password">
      <input type="submit" value="Send">
    </form>
  38. 38.⚡ What does this code print? (Look at the quotes!)
    let x = "3";
    let y = 1;
    console.log(x + y);
    (a) 4 (b) Error (c) 31
  39. 39.⚖️ What colour is the text of this element?
    <h2 class="note" id="end">Hi</h2>
    CSS:
    .note { color: white; }
    h2 { color: blue; }
    #end { color: green; }
    (a) white (b) blue (c) purple (d) green
  40. 40.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag

Answer key

  1. 30
  2. 330
  3. <!DOCTYPE html>
  4. 10
  5. 192
  6. line 2
  7. a paragraph
  8. flex-direction
  9. quiz.html
  10. Visit the site
  11. in the same tab
  12. it tells its meaning
  13. <h1>
  14. https
  15. No
  16. font-weight
  17. orange
  18. 3
  19. <ol>
  20. 17
  21. Play games
  22. purple
  23. screen-reader users
  24. <ul>
  25. bullets
  26. a web server
  27. index.html
  28. Yes
  29. <br>
  30. No
  31. <h1>
  32. 2
  33. tiger.jpg
  34. check for https first
  35. <script>
  36. an attribute
  37. 4
  38. 31
  39. green
  40. an opening tag

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