← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 105 · 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.🎯 Which element does the selector span style? (a) <h1 class="note"> (b) <h2 id="logo"> (c) <span class="note"> (d) <p>
  2. 2.♿ Does this help everyone, or make the page harder to use: colour as the only clue? (a) helps everyone (b) makes it harder
  3. 3.🔢 On a typical page, from top to bottom, which comes FIRST? (a) <nav> (b) <footer> (c) <main> (d) <header>
  4. 4.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <ol> (d) <br>
  5. 5.🧭 Is <div> semantic or not semantic? (a) not semantic (b) semantic
  6. 6.True or false: <input type="number"> takes only numbers. (a) False (b) True
  7. 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z
  8. 8.🌈 Which colour is #ffffff? (a) cyan (b) black (c) white (d) blue
  9. 9.📝 Which tag makes a drop-down list? (a) <li> (b) <ol> (c) <ul> (d) <select>
  10. 10.✍️ How many declarations (property: value pairs) are in this rule?
    h1 {
      width: 300px;
      font-size: 20px;
      color: red;
    }
  11. 11.What does color do? (a) centres a heading (b) colours behind the text (c) makes letters bigger (d) sets the letter colour
  12. 12.✍️ What is the selector in this CSS rule?
    .note {
      background-color: yellow;
      text-align: center;
    }
    (a) #top (b) .note (c) center (d) background-color
  13. 13.📱 The screen is 414px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 14px;
      }
    }
    (a) Yes (b) No
  14. 14.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
  15. 15.🔍 Which line is missing its closing tag?
    line 1: <h2>Good morning!
    line 2: <i>Hello, world!</i>
    line 3: <u>My best friend</u>
    (a) line 3 (b) line 2 (c) line 1
  16. 16.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Jamun</td><td>Orange</td><td>Grapes</td><td>Orange</td></tr>
    </table>
  17. 17.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h6> (d) <h1>
  18. 18.🌍 Which one scrambles data on its way? (a) the server (b) the URL (c) the browser (d) HTTPS
  19. 19.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 40px;
      padding: 30px;
      border: 2px solid black;
      margin: 5px;
    }
  20. 20.🎯 Which CSS selector matches this element?
    <li class="red" id="main">Hello</li>
    (a) .main (b) .box (c) .red (d) div
  21. 21.Which of these is true of <aside>? (a) holds extra side notes (b) is the page’s key part (c) holds one blog post (d) holds the main content
  22. 22.💪 Which justify-content value packs boxes at the end? (a) center (b) flex-start (c) flex-end (d) space-between
  23. 23.🔢 In a basic web page file, which comes LAST? (a) <html> (b) </html> (c) </body> (d) <!DOCTYPE html>
  24. 24.True or false: <input type="text"> lets you tick many. (a) False (b) True
  25. 25.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <p> (c) <meta charset="utf-8"> (d) <style>
  26. 26.🔢 When you open a web page, which comes first: “you type the URL” or “the browser asks it”? (a) you type the URL (b) the browser asks it
  27. 27.🎯 Which CSS selector matches this element?
    <h2 class="box" id="top">Hello</h2>
    (a) #intro (b) #box (c) #top (d) li
  28. 28.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Roses are red<br>Sky is blue<br>Rivers flow<br>Stars shine</p>
  29. 29.🔢 When you open a web page, which comes FIRST? (a) the browser shows it (b) DNS finds the server (c) you type the URL (d) the server sends files
  30. 30.True or false: the border is the line round the box. (a) False (b) True
  31. 31.📄 Can HTML on its own make headings? (a) No (b) Yes
  32. 32.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 220px;
      justify-content: center;
    }
    Inside are 2 boxes, each 40px wide (no margins).
  33. 33.🎯 Can many elements share the same class? (a) No (b) Yes
  34. 34.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) black (c) cyan (d) magenta
  35. 35.True or false: to put secrets in comments is safe. (a) True (b) False
  36. 36.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 240px;
      justify-content: flex-end;
    }
    Inside are 4 boxes, each 40px wide (no margins).
  37. 37.⚡ What does this code print? (Look at the quotes!)
    let x = "8";
    let y = 5;
    console.log(x + y);
    (a) 85 (b) 13 (c) Error
  38. 38.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Space Facts (b) I like to read. (c) body (d) Welcome!
  39. 39.✍️ What value is given to background-color in this rule?
    .box {
      font-style: italic;
      background-color: yellow;
    }
    (a) 8px (b) yellow (c) 10px (d) background-color
  40. 40.🔠 Are headings shown in bold by default? (a) No (b) Yes

Answer key

  1. <span class="note">
  2. makes it harder
  3. <header>
  4. <ul>
  5. not semantic
  6. True
  7. F
  8. white
  9. <select>
  10. 3
  11. sets the letter colour
  12. .note
  13. No
  14. a web server
  15. line 1
  16. 8
  17. <h6>
  18. HTTPS
  19. 114
  20. .red
  21. holds extra side notes
  22. flex-end
  23. </html>
  24. False
  25. <p>
  26. you type the URL
  27. #top
  28. 5
  29. you type the URL
  30. True
  31. Yes
  32. 70
  33. Yes
  34. red
  35. False
  36. 80
  37. 85
  38. Welcome!
  39. yellow
  40. Yes

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