← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 746 · 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.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 300px;
      justify-content: flex-end;
    }
    Inside are 3 boxes, each 80px wide (no margins).
  2. 2.🖌️ Where does the text sit on its line?
    h1 {
      font-size: 40px;
      text-align: center;
      color: red;
      background-color: blue;
    }
    (a) on the right (b) on the left (c) in the middle
  3. 3.🚀 Which file should this code go in: body { margin: 0; } (a) script.js (b) index.html (c) style.css
  4. 4.🔍 One closing tag is missing. Which one?
    <h3>Hello, world!</h3>
    <i>I love mangoes.</i>
    <em>Cricket is fun.
    (a) </h3> (b) </p> (c) </i> (d) </em>
  5. 5.True or false: .menu is a class selector. (a) False (b) True
  6. 6.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 20px;
      }
    }
  7. 7.📊 How many cells does this table have in all?
    <table>
      <tr><td>Jamun</td><td>Jamun</td></tr>
      <tr><td>Papaya</td><td>Jamun</td></tr>
      <tr><td>Papaya</td><td>Papaya</td></tr>
      <tr><td>Litchi</td><td>Papaya</td></tr>
    </table>
  8. 8.🎨 Which tag connects an outside CSS file? (a) <link> (b) <img> (c) <css> (d) <a>
  9. 9.True or false: <li> lists steps in order. (a) False (b) True
  10. 10.🖌️ What colour are the letters?
    h2 {
      color: orange;
      font-size: 16px;
      text-align: left;
      background-color: purple;
    }
    (a) purple (b) orange (c) blue
  11. 11.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
  12. 12.📝 Which tag makes a big box for many lines of text? (a) <p> (b) <textarea> (c) <br> (d) <input>
  13. 13.⚡ What number does this code print?
    let a = 46;
    let b = 8;
    console.log(a - b);
  14. 14.🎯 Which sign starts an id selector? (a) & (b) @ (c) . (d) #
  15. 15.True or false: “images with no alt” makes the page harder to use. (a) False (b) True
  16. 16.🔗 Which words do you click on?
    <a href="contact.html">Maths fun</a>
    (a) Art corner (b) Maths fun (c) href (d) contact.html
  17. 17.🔢 On a typical page, from top to bottom, which comes LAST? (a) <header> (b) <footer> (c) <nav> (d) <main>
  18. 18.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ol>
    (a) numbers (b) bullets
  19. 19.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 14px;
      }
    }
  20. 20.True or false: HTML on its own cannot show paragraphs. (a) False (b) True
  21. 21.🌗 Is black on white easy or hard to read? (a) hard to read (b) easy to read
  22. 22.⚡ What does this code print? (Look at the quotes!)
    let x = "1";
    let y = 6;
    console.log(x + y);
    (a) 7 (b) Error (c) 16
  23. 23.⚖️ What colour is the text of this element?
    <h2 class="note" id="end">Hi</h2>
    CSS:
    #end { color: green; }
    #end { color: orange; }
    (a) purple (b) blue (c) green (d) orange
  24. 24.🔗 Which words do you click on?
    <a href="maths.html">Maths fun</a>
    (a) href (b) Art corner (c) maths.html (d) Maths fun
  25. 25.True or false: <main> holds a side box of tips. (a) False (b) True
  26. 26.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  27. 27.🔗 Where does this link open?
    <a href="games.html">Play games</a>
    (a) in a new tab (b) in the same tab
  28. 28.🔗 Where does this link open?
    <a href="games.html">Art corner</a>
    (a) in a new tab (b) in the same tab
  29. 29.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Litchi</td><td>Grapes</td><td>Banana</td></tr>
    </table>
  30. 30.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) The full moon (b) dog.jpg (c) A happy dog (d) width
  31. 31.📝 How many <input> tags are in this form?
    <form>
      <input type="checkbox">
      <input type="text">
      <input type="email">
      <input type="submit" value="Send">
    </form>
  32. 32.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="sport"> Chess
      <input type="radio" name="sport"> Cricket
      <input type="radio" name="sport"> Football
    </form>
  33. 33.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  34. 34.Which of these is true of <header>? (a) holds copyright notes (b) holds the main content (c) sits at the very top (d) helps you move around
  35. 35.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red</p>
  36. 36.True or false: <p> is an empty tag. (a) True (b) False
  37. 37.🛡️ Online: is it safe to put secrets in comments? (a) not safe (b) safe
  38. 38.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <ul> (d) <p>
  39. 39.🔐 Is Kite_Fl1es@Dawn a strong or a weak password? (a) weak (b) strong
  40. 40.Which of these does HTML do? (a) puts a picture on a page (b) changes the text size (c) changes the page live (d) shows a pop-up message

Answer key

  1. 60
  2. in the middle
  3. style.css
  4. </em>
  5. True
  6. 20
  7. 8
  8. <link>
  9. False
  10. orange
  11. 6
  12. <textarea>
  13. 38
  14. #
  15. True
  16. Maths fun
  17. <footer>
  18. numbers
  19. 14
  20. False
  21. easy to read
  22. 16
  23. orange
  24. Maths fun
  25. False
  26. has a closing tag
  27. in the same tab
  28. in the same tab
  29. 2
  30. A happy dog
  31. 4
  32. 1
  33. in a new tab
  34. sits at the very top
  35. 2
  36. False
  37. not safe
  38. <li>
  39. strong
  40. puts a picture on a page

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