← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 560 · 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.True or false: <a href="a.html">Go</a> goes in style.css. (a) True (b) False
  2. 2.✍️ How many declarations (property: value pairs) are in this rule?
    .note {
      border: 2px solid;
      font-weight: bold;
      padding: 8px;
    }
  3. 3.✍️ Which property is set to center in this rule?
    h2 {
      color: red;
      border: 2px solid;
      font-weight: bold;
      text-align: center;
    }
    (a) center (b) background-color (c) margin (d) text-align
  4. 4.True or false: <header> sits at the very top. (a) False (b) True
  5. 5.🎯 What kind of selector is .card? (a) a class selector (b) an id selector (c) an element selector
  6. 6.✍️ Which property is set to red in this rule?
    #top {
      font-weight: bold;
      margin: 10px;
      color: red;
      padding: 8px;
    }
    (a) red (b) text-align (c) color (d) font-size
  7. 7.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Mango</li>
      <li>Litchi</li>
    </ol>
    (a) bullets (b) numbers
  8. 8.🌈 Which hex code is white? (a) #ff00ff (b) #00ff00 (c) #ffff00 (d) #ffffff
  9. 9.🔗 Which words do you click on?
    <a href="games.html">School news</a>
    (a) href (b) games.html (c) Take the quiz (d) School news
  10. 10.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) in a big heading (d) at the bottom
  11. 11.📊 In a table, which tag is a row? (a) <td> (b) <tb> (c) <th> (d) <tr>
  12. 12.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 4; i++) {
      total = total + 8;
    }
    console.log(total);
  13. 13.🎯 Which element does the selector .note style? (a) <div class="big"> (b) <div id="note"> (c) <div class="note"> (d) <span class="red">
  14. 14.Which of these has a closing tag? (a) <ul> (b) <hr> (c) <br> (d) <img>
  15. 15.True or false: <br> has a closing tag. (a) False (b) True
  16. 16.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 16px;
      }
    }
  17. 17.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 3; i++) {
      total = total + i;
    }
    console.log(total);
  18. 18.True or false: JavaScript lays out the page. (a) True (b) False
  19. 19.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) alt (d) height
  20. 20.🔁 How many times does this code print “Welcome”?
    for (let i = 2; i <= 8; i++) {
      console.log("Welcome");
    }
  21. 21.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the later one (b) the first one (c) neither (d) the shorter one
  22. 22.What is <input type="number"> for? (a) takes only numbers (b) sends the form (c) is for an email address (d) is for one line of words
  23. 23.💬 How does an HTML comment start? (a) # (b) // (c) /* (d) <!--
  24. 24.🖌️ How big is the text, in px?
    li {
      color: orange;
      background-color: purple;
      font-size: 24px;
      text-align: left;
    }
  25. 25.📝 Which input type lets you tick many? (a) radio (b) date (c) checkbox (d) number
  26. 26.✍️ What is the selector in this CSS rule?
    li {
      margin: 10px;
      border: 2px solid;
      font-style: italic;
      font-weight: bold;
    }
    (a) li (b) body (c) margin (d) 2px solid
  27. 27.🔢 In a basic web page file, which comes first: “</body>” or “<head>”? (a) <head> (b) </body>
  28. 28.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="350">
    (a) cake.jpg (b) Birthday cake (c) width (d) A happy dog
  29. 29.🌈 Which colour of light is strongest in rgb(5, 167, 64)? (a) blue (b) green (c) red
  30. 30.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
  31. 31.True or false: .box { padding: 8px; } goes in style.css. (a) True (b) False
  32. 32.📱 Which tag helps phones show a page at the right size? (a) the title tag (b) the br tag (c) the viewport meta tag (d) the hr tag
  33. 33.🌍 What is the protocol in this URL?
    http://www.example.net/games/chess.html
    (a) www.example.net (b) https (c) /games/chess.html (d) http
  34. 34.⚡ Which tag holds JavaScript in a page? (a) <js> (b) <style> (c) <script> (d) <code>
  35. 35.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 220px;
      padding: 10px;
      border: 3px solid black;
      margin: 5px;
    }
  36. 36.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>The red kite</h2>
    <p>Rain today</p>
    <p>Hello, world!</p>
    <h2>Cricket is fun.</h2>
    <p>Rain today</p>
  37. 37.🖌️ What colour is behind the letters?
    li {
      text-align: right;
      background-color: red;
      color: white;
      font-size: 24px;
    }
    (a) red (b) green (c) white
  38. 38.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  39. 39.🧭 Is <header> semantic or not semantic? (a) not semantic (b) semantic
  40. 40.True or false: HTTPS sends the page back. (a) True (b) False

Answer key

  1. False
  2. 3
  3. text-align
  4. True
  5. a class selector
  6. color
  7. numbers
  8. #ffffff
  9. School news
  10. on the browser tab
  11. <tr>
  12. 32
  13. <div class="note">
  14. <ul>
  15. False
  16. 16
  17. 6
  18. False
  19. alt
  20. 7
  21. the later one
  22. takes only numbers
  23. <!--
  24. 24
  25. checkbox
  26. li
  27. <head>
  28. Birthday cake
  29. green
  30. 2
  31. True
  32. the viewport meta tag
  33. http
  34. <script>
  35. 256
  36. 4
  37. red
  38. No
  39. semantic
  40. False

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