← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 887 · 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: <title> has a closing tag. (a) True (b) False
  2. 2.⚖️ Which selector is the weakest? (a) an id selector (b) a class selector (c) an element selector
  3. 3.⚖️ What colour is the text of this element?
    <h1 class="big" id="logo">Hi</h1>
    CSS:
    .big { color: black; }
    h1 { color: yellow; }
    (a) black (b) white (c) red (d) yellow
  4. 4.True or false: “skipping heading levels” makes the page harder to use. (a) True (b) False
  5. 5.True or false: <ul> lists steps in order. (a) True (b) False
  6. 6.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="300">
  7. 7.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Fun facts (c) The red kite
  8. 8.Which of these is not safe to do online? (a) use a strong password (b) tell a trusted adult (c) download from pop-ups (d) ask before downloading
  9. 9.True or false: <input type="email"> is for an email address. (a) False (b) True
  10. 10.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 6; i++) {
      total = total + 6;
    }
    console.log(total);
  11. 11.🌍 Which one shows the page to you? (a) HTTPS (b) the browser (c) the URL (d) the server
  12. 12.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 8px;
      }
    }
  13. 13.📊 How many cells does this table have in all?
    <table>
      <tr><td>Jamun</td><td>Jamun</td><td>Jamun</td><td>Orange</td></tr>
      <tr><td>Guava</td><td>Orange</td><td>Papaya</td><td>Guava</td></tr>
    </table>
  14. 14.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is free (b) the site is fast (c) the data is scrambled (d) the site is a game
  15. 15.True or false: <b> has a closing tag. (a) False (b) True
  16. 16.🔁 What does this code print?
    let score = 50;
    if (score > 6) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) You win (b) Play again
  17. 17.Which of these goes in the head? (a) <img> (b) <p> (c) <style> (d) <ul>
  18. 18.Which of these goes in the body? (a) <style> (b) <img> (c) <meta charset="utf-8"> (d) <title>
  19. 19.True or false: JavaScript gives the page structure. (a) True (b) False
  20. 20.🖌️ What colour are the letters?
    p {
      color: orange;
      font-size: 36px;
      text-align: center;
      background-color: green;
    }
    (a) green (b) blue (c) orange
  21. 21.True or false: <input> has a closing tag. (a) False (b) True
  22. 22.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Papaya</td><td>Grapes</td></tr>
    </table>
  23. 23.🌈 Which colour of light is strongest in rgb(199, 34, 2)? (a) red (b) blue (c) green
  24. 24.🌍 Which one stores the site’s files? (a) HTTPS (b) the browser (c) the URL (d) the server
  25. 25.💪 Which justify-content value packs boxes at the end? (a) center (b) space-between (c) flex-end (d) flex-start
  26. 26.True or false: <input type="checkbox"> picks a day. (a) True (b) False
  27. 27.✍️ How does a CSS comment start? (a) # (b) <!-- (c) // (d) /*
  28. 28.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
  29. 29.⚖️ What colour is the text of this element?
    <h1 class="big" id="intro">Hi</h1>
    CSS:
    h1 { color: purple; }
    h1 { color: red; }
    (a) green (b) red (c) black (d) purple
  30. 30.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 6; i++) {
      total = total + 9;
    }
    console.log(total);
  31. 31.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dot . (d) a dollar $
  32. 32.🌍 What is the protocol in this URL?
    https://kids.example.org/news/today.html
    (a) http (b) /news/today.html (c) https (d) kids.example.org
  33. 33.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  34. 34.✍️ What value is given to color in this rule?
    .note {
      font-size: 20px;
      margin: 10px;
      color: red;
    }
    (a) center (b) color (c) 20px (d) red
  35. 35.🚀 Which file should this code go in: alert(score); (a) index.html (b) script.js (c) style.css
  36. 36.🔗 Where does this link open?
    <a href="art.html">About us</a>
    (a) in a new tab (b) in the same tab
  37. 37.⚖️ Which selector is the strongest? (a) a class selector (b) an id selector (c) an element selector
  38. 38.📝 What does <br> do? (a) makes text bold (b) starts a new line (c) makes a list (d) adds a picture
  39. 39.🎯 Which element does the selector .menu style? (a) <p class="note"> (b) <p id="menu"> (c) <h1 class="big"> (d) <p class="menu">
  40. 40.🎨 One CSS file can style how many pages? (a) only one image (b) no pages (c) many pages (d) only one word

Answer key

  1. True
  2. an element selector
  3. black
  4. True
  5. False
  6. 300
  7. Fun facts
  8. download from pop-ups
  9. True
  10. 36
  11. the browser
  12. 8
  13. 8
  14. the data is scrambled
  15. True
  16. You win
  17. <style>
  18. <img>
  19. False
  20. orange
  21. False
  22. 2
  23. red
  24. the server
  25. flex-end
  26. False
  27. /*
  28. 6
  29. red
  30. 54
  31. a slash /
  32. https
  33. an opening tag
  34. red
  35. script.js
  36. in the same tab
  37. an id selector
  38. starts a new line
  39. <p class="menu">
  40. many pages

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