← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 407 · 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.🛡️ Online: is it safe to use a strong password? (a) not safe (b) safe
  2. 2.⚡ Which tag holds JavaScript in a page? (a) <script> (b) <js> (c) <code> (d) <style>
  3. 3.🔁 What does this code print?
    let temp = 2;
    if (temp >= 9) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Cool (b) Hot
  4. 4.True or false: in <img>, height tells which image to load. (a) False (b) True
  5. 5.📝 Which input type picks a day? (a) checkbox (b) password (c) submit (d) date
  6. 6.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>
  7. 7.⚖️ What colour is the text of this element?
    <p class="box" id="logo">Hi</p>
    CSS:
    .box { color: blue; }
    .box { color: green; }
    (a) green (b) yellow (c) orange (d) blue
  8. 8.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue<br>Rivers flow<br>Roses are red<br>Birds sing</p>
  9. 9.True or false: #top { color: blue; } goes in script.js. (a) False (b) True
  10. 10.🔍 Which line is missing its closing tag?
    line 1: <small>My best friend</small>
    line 2: <em>The red kite
    line 3: <b>Our school trip</b>
    (a) line 3 (b) line 2 (c) line 1
  11. 11.🔢 To build and share your first web page, what comes right after “plan what to show”? (a) add CSS styles (b) publish it online (c) write the HTML (d) test in a browser
  12. 12.✍️ Which sign ends each CSS declaration? (a) , (b) ; (c) . (d) :
  13. 13.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  14. 14.🧭 Why use <nav> instead of <div> for a menu? (a) it makes text red (b) it adds pictures (c) it tells its meaning (d) it loads faster
  15. 15.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 4; i++) {
      total = total + 3;
    }
    console.log(total);
  16. 16.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
  17. 17.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 10px;
      }
    }
  18. 18.🖌️ Which CSS property sets the letter colour? (a) text-align (b) color (c) font-weight (d) background-color
  19. 19.Which of these is not safe to do online? (a) keep passwords secret (b) use a strong password (c) check for https first (d) click prize links
  20. 20.Which of these is true of <article>? (a) holds a news story (b) helps you move around (c) holds extra side notes (d) holds copyright notes
  21. 21.✍️ What is the selector in this CSS rule?
    p {
      font-size: 20px;
      font-style: italic;
    }
    (a) .note (b) italic (c) font-size (d) p
  22. 22.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="sport"> Kabaddi
      <input type="radio" name="sport"> Chess
      <input type="radio" name="sport"> Cricket
    </form>
  23. 23.📱 max-width: 600px applies when the screen is ___. (a) exactly 1000px (b) turned off (c) 600px or narrower (d) 600px or wider
  24. 24.🌐 Which one hosts websites online? (a) a code editor (b) a web server (c) a web browser
  25. 25.Which of these does CSS do? (a) changes the text size (b) puts a picture on a page (c) gives the page structure (d) shows a pop-up message
  26. 26.🎯 Which CSS selector matches this element?
    <p class="menu" id="main">Hello</p>
    (a) p (b) .note (c) .main (d) #menu
  27. 27.True or false: <td> makes one table row. (a) False (b) True
  28. 28.📝 What does a password box show instead of letters? (a) capital letters (b) numbers (c) emojis (d) dots
  29. 29.⚖️ What colour is the text of this element?
    <p class="big" id="hero">Hi</p>
    CSS:
    #hero { color: green; }
    #hero { color: white; }
    (a) yellow (b) white (c) green (d) black
  30. 30.🌈 Which colour of light is strongest in rgb(113, 194, 14)? (a) blue (b) green (c) red
  31. 31.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 370px;
      justify-content: flex-end;
    }
    Inside are 3 boxes, each 100px wide (no margins).
  32. 32.🌍 What is the protocol in this URL?
    https://school.example.in/games/chess.html
    (a) https (b) school.example.in (c) http (d) /games/chess.html
  33. 33.🖌️ What colour is behind the letters?
    p {
      text-align: center;
      color: blue;
      font-size: 12px;
      background-color: orange;
    }
    (a) blue (b) green (c) orange
  34. 34.True or false: to use a strong password is not safe. (a) True (b) False
  35. 35.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to add colour (d) to show pictures
  36. 36.True or false: in <img>, src is read by screen readers. (a) False (b) True
  37. 37.⚡ What number does this code print?
    let a = 50;
    let b = 24;
    console.log(a - b);
  38. 38.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  39. 39.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <\h2> (c) </h2> (d) <h2/>
  40. 40.Which of these is margin? (a) the line round the box (b) the gap round content (c) the text or picture (d) the gap to other boxes

Answer key

  1. safe
  2. <script>
  3. Cool
  4. False
  5. date
  6. <ol>
  7. green
  8. 5
  9. False
  10. line 2
  11. write the HTML
  12. ;
  13. a closing tag
  14. it tells its meaning
  15. 12
  16. False
  17. 10
  18. color
  19. click prize links
  20. holds a news story
  21. p
  22. 1
  23. 600px or narrower
  24. a web server
  25. changes the text size
  26. p
  27. False
  28. dots
  29. white
  30. green
  31. 70
  32. https
  33. orange
  34. False
  35. to leave notes
  36. False
  37. 26
  38. No
  39. </h2>
  40. the gap to other boxes

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