← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 785 · 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 much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 60px;
      padding: 20px;
      border: 2px solid black;
      margin: 20px;
    }
  2. 2.🔒 Is the connection to this address scrambled (encrypted)?
    http://kids.example.org/about.html
    (a) No (b) Yes
  3. 3.🔁 How many times does this code print “Hello”?
    for (let i = 2; i < 10; i++) {
      console.log("Hello");
    }
  4. 4.🌍 What is the protocol in this URL?
    https://kids.example.org/index.html
    (a) kids.example.org (b) http (c) /index.html (d) https
  5. 5.📊 How many cells are in each row?
    <table>
      <tr><td>Jamun</td><td>Papaya</td><td>Guava</td><td>Grapes</td></tr>
      <tr><td>Grapes</td><td>Orange</td><td>Guava</td><td>Grapes</td></tr>
    </table>
  6. 6.🎯 Which CSS selector matches this element?
    <div class="menu" id="top">Hello</div>
    (a) #top (b) .note (c) #intro (d) #menu
  7. 7.What is <input type="radio"> for? (a) hides what you type (b) lets you pick only one (c) lets you tick many (d) is for an email address
  8. 8.📋 What number does the browser show next to “Grapes”?
    <ol start="4">
      <li>Orange</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
  9. 9.📱 The screen is 540px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 18px;
      }
    }
    (a) No (b) Yes
  10. 10.Which of these is a weak password? (a) Chai$Cup_19x (b) Mango#Kite29! (c) abcd1234 (d) Kite_Fl1es@Dawn
  11. 11.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Mouse (c) Markup (d) Modern
  12. 12.🔁 What does this code print?
    let marks = 48;
    if (marks < 45) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Try again (b) Pass
  13. 13.⚖️ Which selector is the strongest? (a) an element selector (b) a class selector (c) an id selector
  14. 14.Which colour pair is hard to read? (a) white on dark blue (b) black on white (c) white on black (d) yellow on white
  15. 15.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h1> or <h2>? (a) <h2> (b) <h4> (c) <h1> (d) <h3>
  16. 16.🌍 What finds the server for a domain name like example.com? (a) alt (b) DNS (c) HTML (d) CSS
  17. 17.🔗 Which address opens when you click this link?
    <a href="quiz.html">Art corner</a>
    (a) games.html (b) quiz.html (c) Art corner (d) about.html
  18. 18.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h5> or <h4>? (a) <h4> (b) <h5> (c) <h3> (d) <h6>
  19. 19.🌍 What is the domain name in this URL?
    http://learn.example.com/art/gallery.html
    (a) learn.example.com (b) http (c) www.example.com (d) /art/gallery.html
  20. 20.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Good morning!</p>
    <p>Rain today</p>
    <!-- <p>Hello, world!</p> -->
    (a) Good morning! (b) My pets (c) Rain today (d) Hello, world!
  21. 21.💪 Which justify-content value packs boxes at the start? (a) center (b) flex-end (c) space-between (d) flex-start
  22. 22.📝 Which tag holds a whole form? (a) <form> (b) <ol> (c) <input> (d) <table>
  23. 23.True or false: in <img>, alt names the picture file. (a) True (b) False
  24. 24.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) on the browser tab (d) at the bottom
  25. 25.🔗 Where does this link open?
    <a href="art.html">School news</a>
    (a) in a new tab (b) in the same tab
  26. 26.🌈 In #300000 the red part is the hex number 30. What is it as a normal number?
  27. 27.🎨 Which tag holds CSS inside the head? (a) <css> (b) <style> (c) <script> (d) <body>
  28. 28.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Roses are red</p>
  29. 29.True or false: the server is the page’s address. (a) False (b) True
  30. 30.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  31. 31.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
    (a) I love mangoes. (b) Cricket is fun. (c) The red kite
  32. 32.True or false: <p> goes in the head. (a) False (b) True
  33. 33.⚡ What number does this code print?
    let a = 6;
    let b = 2;
    console.log(a + b);
  34. 34.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) My drawings (b) Space Facts (c) index.html (d) I like to read.
  35. 35.⚖️ What colour is the text of this element?
    <p class="note" id="top">Hi</p>
    CSS:
    #top { color: black; }
    #top { color: yellow; }
    (a) blue (b) yellow (c) red (d) black
  36. 36.Which of these is true of a web browser? (a) turns HTML into a page (b) answers page requests (c) hosts websites online (d) stores a website’s files
  37. 37.🔐 Is 123456 a strong or a weak password? (a) weak (b) strong
  38. 38.🚀 What is the home page file of a website usually called? (a) main.png (b) start.js (c) home.css (d) index.html
  39. 39.🔁 Which loop repeats code a set number of times? (a) if (b) else (c) let (d) for
  40. 40.⚖️ What colour is the text of this element?
    <h1 class="red" id="intro">Hi</h1>
    CSS:
    h1 { color: white; }
    #intro { color: black; }
    (a) blue (b) red (c) white (d) black

Answer key

  1. 144
  2. No
  3. 8
  4. https
  5. 4
  6. #top
  7. lets you pick only one
  8. 6
  9. Yes
  10. abcd1234
  11. Markup
  12. Try again
  13. an id selector
  14. yellow on white
  15. <h4>
  16. DNS
  17. quiz.html
  18. <h3>
  19. learn.example.com
  20. Hello, world!
  21. flex-start
  22. <form>
  23. False
  24. on the browser tab
  25. in the same tab
  26. 48
  27. <style>
  28. 2
  29. False
  30. has a closing tag
  31. The red kite
  32. False
  33. 8
  34. Space Facts
  35. yellow
  36. turns HTML into a page
  37. weak
  38. index.html
  39. for
  40. black

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