← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 963 · 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.🎯 What kind of selector is .big? (a) an element selector (b) an id selector (c) a class selector
  2. 2.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 280px;
      padding: 10px;
      border: 1px solid black;
      margin: 15px;
    }
  3. 3.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 20px;
      }
    }
  4. 4.♿ A part of the page is under a <h3> heading. Which tag should its sub-heading use? (a) <h5> (b) <h6> (c) <h4> (d) <h2>
  5. 5.Which of these is an opening tag? (a) </title> (b) </p> (c) <h1> (d) </h1>
  6. 6.True or false: to post your home address is safe. (a) True (b) False
  7. 7.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 70px;
      padding: 25px;
      border: 5px solid black;
      margin: 0px;
    }
  8. 8.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the title (d) the doctype
  9. 9.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
  10. 10.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  11. 11.Which of these is an opening tag? (a) <p> (b) </b> (c) </body> (d) </p>
  12. 12.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Jamun</td><td>Banana</td><td>Papaya</td></tr>
      <tr><td>Banana</td><td>Jamun</td><td>Litchi</td></tr>
    </table>
  13. 13.🔗 Which words do you click on?
    <a href="https://example.com">School news</a>
    (a) School news (b) Take the quiz (c) https://example.com (d) href
  14. 14.Which of these is safe to do online? (a) download from pop-ups (b) type a password on http (c) keep passwords secret (d) meet an online stranger
  15. 15.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
  16. 16.🔗 Where does this link open?
    <a href="contact.html" target="_blank">School news</a>
    (a) in the same tab (b) in a new tab
  17. 17.⚡ What number does this code print?
    let a = 12;
    let b = 3;
    console.log(a * b);
  18. 18.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  19. 19.Which of these is a closing tag? (a) <title> (b) <b> (c) <body> (d) </b>
  20. 20.Which of these is an empty tag? (a) <h1> (b) <p> (c) <hr> (d) <title>
  21. 21.♿ Does this help everyone, or make the page harder to use: images with no alt? (a) helps everyone (b) makes it harder
  22. 22.True or false: CSS changes the page live. (a) False (b) True
  23. 23.True or false: the border is the line round the box. (a) True (b) False
  24. 24.True or false: <td> makes a heading cell. (a) True (b) False
  25. 25.🌈 Which colour is #ffff00? (a) blue (b) black (c) yellow (d) bright green
  26. 26.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 220px;
      justify-content: flex-start;
    }
    Inside are 3 boxes, each 60px wide (no margins).
  27. 27.🔍 Which is the odd one out? (a) hosts websites online (b) colours code to help us (c) answers page requests (d) stores a website’s files
  28. 28.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) body (b) Easy snacks (c) Class 7 Blog (d) We won by 5 runs.
  29. 29.📊 Which tag holds the whole table? (a) <table> (b) <th> (c) <td> (d) <tr>
  30. 30.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 1000 (d) 99
  31. 31.⚡ Which tag holds JavaScript in a page? (a) <script> (b) <style> (c) <code> (d) <js>
  32. 32.Which of these is an empty tag? (a) <input> (b) <h1> (c) <b> (d) <title>
  33. 33.⚖️ Which selector is the weakest? (a) a class selector (b) an element selector (c) an id selector
  34. 34.🔗 Which words do you click on?
    <a href="quiz.html">About us</a>
    (a) quiz.html (b) Contact us (c) About us (d) href
  35. 35.⚖️ What colour is the text of this element?
    <h2 class="red" id="intro">Hi</h2>
    CSS:
    #intro { color: orange; }
    #intro { color: black; }
    (a) green (b) orange (c) white (d) black
  36. 36.🔁 When does the else part run? (a) always (b) never (c) when if is false (d) when if is true
  37. 37.Which of these is true of a web browser? (a) opens web pages for us (b) colours code to help us (c) saves our .html files (d) answers page requests
  38. 38.📝 Which tag gives a form box a name you can click? (a) <hr> (b) <h1> (c) <title> (d) <label>
  39. 39.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
    (a) Good morning! (b) The red kite (c) My pets
  40. 40.🖼️ Does <img> need a closing tag? (a) Yes (b) No

Answer key

  1. a class selector
  2. 332
  3. 12
  4. <h4>
  5. <h1>
  6. False
  7. 130
  8. the body
  9. F
  10. an opening tag
  11. <p>
  12. 3
  13. School news
  14. keep passwords secret
  15. href
  16. in a new tab
  17. 36
  18. in the head
  19. </b>
  20. <hr>
  21. makes it harder
  22. False
  23. True
  24. False
  25. yellow
  26. 40
  27. colours code to help us
  28. Easy snacks
  29. <table>
  30. 255
  31. <script>
  32. <input>
  33. an element selector
  34. About us
  35. black
  36. when if is false
  37. opens web pages for us
  38. <label>
  39. Good morning!
  40. No

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