← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 873 · 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 is the path in this URL?
    https://www.example.com/games/chess.html
    (a) /about.html (b) /games/chess.html (c) www.example.com (d) https
  2. 2.🔢 In a basic web page file, which comes LAST? (a) <head> (b) <html> (c) </head> (d) </html>
  3. 3.🔢 On a typical page, from top to bottom, which comes first: “<footer>” or “<header>”? (a) <footer> (b) <header>
  4. 4.⚖️ What colour is the text of this element?
    <p class="note" id="end">Hi</p>
    CSS:
    .note { color: white; }
    #end { color: purple; }
    (a) white (b) blue (c) green (d) purple
  5. 5.Which of these is true of a web server? (a) opens web pages for us (b) sends pages over the net (c) has an address bar (d) shows pages from the web
  6. 6.🔁 Which word runs code only when something is true? (a) for (b) let (c) if (d) log
  7. 7.🚀 You change your code. What should you do to see the change? (a) switch off the PC (b) save and refresh (c) delete the file (d) rename the folder
  8. 8.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) in a big heading (d) at the bottom
  9. 9.True or false: “link text “click here”” makes the page harder to use. (a) True (b) False
  10. 10.🔗 Which address opens when you click this link?
    <a href="about.html">Visit the site</a>
    (a) https://example.com (b) about.html (c) contact.html (d) Visit the site
  11. 11.🎯 Which sign starts an id selector? (a) . (b) # (c) & (d) @
  12. 12.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 4 (d) 2
  13. 13.🔐 Is Blue@Tiger_74 a strong or a weak password? (a) strong (b) weak
  14. 14.✍️ Which property is set to 300px in this rule?
    body {
      padding: 8px;
      width: 300px;
      font-style: italic;
      text-align: center;
    }
    (a) font-style (b) width (c) 300px (d) color
  15. 15.⚡ What does this code print? (Look at the quotes!)
    let x = "9";
    let y = 6;
    console.log(x + y);
    (a) 96 (b) Error (c) 15
  16. 16.✍️ How many declarations (property: value pairs) are in this rule?
    .note {
      padding: 8px;
    }
  17. 17.📱 The screen is 375px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 18px;
      }
    }
    (a) No (b) Yes
  18. 18.🌍 Which one shows the page to you? (a) HTTPS (b) the URL (c) the server (d) the browser
  19. 19.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 15; i = i + 3) {
      console.log(i);
    }
  20. 20.🌍 What is the protocol in this URL?
    https://www.example.net/index.html
    (a) https (b) www.example.net (c) http (d) /index.html
  21. 21.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Litchi</li>
    </ol>
    (a) numbers (b) bullets
  22. 22.🖌️ Which CSS property makes the text bold? (a) text-align (b) color (c) background-color (d) font-weight
  23. 23.🔢 To build and share your first web page, which comes LAST? (a) add CSS styles (b) test in a browser (c) publish it online (d) write the HTML
  24. 24.✍️ What value is given to border in this rule?
    body {
      font-weight: bold;
      border: 2px solid;
      font-size: 20px;
      font-style: italic;
    }
    (a) 2px solid (b) 300px (c) italic (d) border
  25. 25.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  26. 26.⚖️ What colour is the text of this element?
    <h1 class="box" id="main">Hi</h1>
    CSS:
    #main { color: red; }
    #main { color: black; }
    (a) red (b) orange (c) black (d) purple
  27. 27.True or false: in <img>, alt sets how wide it is. (a) True (b) False
  28. 28.🔍 Which line is missing its closing tag?
    line 1: <h1>The red kite</h1>
    line 2: <b>My best friend
    line 3: <i>Our school trip</i>
    (a) line 1 (b) line 3 (c) line 2
  29. 29.✍️ CSS declarations go inside which brackets? (a) < > (b) { } (c) [ ] (d) ( )
  30. 30.🔍 Which is the odd one out? (a) stores a website’s files (b) saves our .html files (c) sends pages over the net (d) hosts websites online
  31. 31.🧩 Which language makes a form box? (a) CSS (b) JavaScript (c) HTML
  32. 32.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
  33. 33.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 14px;
      }
    }
  34. 34.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 7; i++) {
      total = total + 6;
    }
    console.log(total);
  35. 35.True or false: <td> makes one table row. (a) True (b) False
  36. 36.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 100 (d) 1000
  37. 37.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 180px;
      justify-content: flex-end;
    }
    Inside are 2 boxes, each 80px wide (no margins).
  38. 38.📱 Which tag helps phones show a page at the right size? (a) the title tag (b) the viewport meta tag (c) the hr tag (d) the br tag
  39. 39.True or false: in <img>, height shows if the image fails. (a) True (b) False
  40. 40.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine<br>Sky is blue<br>Kites fly high<br>Rivers flow</p>

Answer key

  1. /games/chess.html
  2. </html>
  3. <header>
  4. purple
  5. sends pages over the net
  6. if
  7. save and refresh
  8. on the browser tab
  9. True
  10. about.html
  11. #
  12. 3
  13. strong
  14. width
  15. 96
  16. 1
  17. No
  18. the browser
  19. 12
  20. https
  21. numbers
  22. font-weight
  23. publish it online
  24. 2px solid
  25. has a closing tag
  26. black
  27. False
  28. line 2
  29. { }
  30. saves our .html files
  31. HTML
  32. href
  33. 20
  34. 42
  35. False
  36. 255
  37. 20
  38. the viewport meta tag
  39. False
  40. 5

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