← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 471 · 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 wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 70px;
      padding: 30px;
      border: 2px solid black;
      margin: 5px;
    }
  2. 2.🔍 Which is the odd one out? (a) hosts websites online (b) is where we type code (c) colours code to help us (d) saves our .html files
  3. 3.🌐 Which one shows line numbers? (a) a web server (b) a code editor (c) a web browser
  4. 4.📱 The screen is 414px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 14px;
      }
    }
    (a) No (b) Yes
  5. 5.🌈 Which hex code is blue? (a) #ffff00 (b) #ffffff (c) #00ff00 (d) #0000ff
  6. 6.📊 How many cells are in each row?
    <table>
      <tr><td>Mango</td><td>Grapes</td><td>Grapes</td><td>Litchi</td></tr>
      <tr><td>Grapes</td><td>Papaya</td><td>Guava</td><td>Jamun</td></tr>
      <tr><td>Banana</td><td>Banana</td><td>Jamun</td><td>Mango</td></tr>
    </table>
  7. 7.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) address (c) attribute (d) editor
  8. 8.Which of these is padding? (a) the gap round content (b) a solid or dotted edge (c) the text or picture (d) space outside the border
  9. 9.Which of these is an empty tag? (a) <h1> (b) <li> (c) <p> (d) <img>
  10. 10.🖌️ Which CSS property sets the letter colour? (a) text-align (b) font-size (c) background-color (d) color
  11. 11.True or false: “use big enough text” helps everyone use the page. (a) True (b) False
  12. 12.🔗 Where does this link open?
    <a href="news.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  13. 13.True or false: <a> goes in the head. (a) False (b) True
  14. 14.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
  15. 15.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 160px;
      padding: 25px;
      border: 2px solid black;
      margin: 0px;
    }
  16. 16.✍️ Which property is set to 10px in this rule?
    body {
      margin: 10px;
      text-align: center;
      font-weight: bold;
    }
    (a) font-weight (b) 10px (c) margin (d) padding
  17. 17.⚡ What does alert() show? (a) a table (b) a new tab (c) a pop-up box (d) a picture
  18. 18.True or false: margin is the gap round content. (a) True (b) False
  19. 19.Which of these is a closing tag? (a) <body> (b) <title> (c) </b> (d) <li>
  20. 20.🔐 Is password a strong or a weak password? (a) weak (b) strong
  21. 21.⚡ Which JavaScript word repeats code? (a) console.log() (b) alert() (c) for (d) if
  22. 22.True or false: in <img>, src sets how tall it is. (a) True (b) False
  23. 23.Which of these is an opening tag? (a) <body> (b) </h1> (c) </body> (d) </b>
  24. 24.🔁 How many times does this code print “Hello”?
    for (let i = 1; i < 10; i++) {
      console.log("Hello");
    }
  25. 25.🧩 Which language counts down a timer? (a) HTML (b) JavaScript (c) CSS
  26. 26.🌈 Which colour is #ff0000? (a) cyan (b) red (c) yellow (d) black
  27. 27.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  28. 28.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
  29. 29.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 6px;
      }
    }
  30. 30.⚖️ What colour is the text of this element?
    <h2 class="box" id="logo">Hi</h2>
    CSS:
    h2 { color: green; }
    #logo { color: purple; }
    .box { color: white; }
    (a) purple (b) white (c) green (d) red
  31. 31.🌍 What is the protocol in this URL?
    http://kids.example.org/maths/tables.html
    (a) http (b) https (c) /maths/tables.html (d) kids.example.org
  32. 32.Which of these is a strong password? (a) qwerty (b) Blue@Tiger_74 (c) abcd1234 (d) 111111
  33. 33.🔒 Is the connection to this address scrambled (encrypted)?
    http://www.example.com/about.html
    (a) No (b) Yes
  34. 34.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <li> (d) <ol>
  35. 35.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="sport"> Hockey
      <input type="checkbox" name="sport"> Chess
      <input type="checkbox" name="sport"> Cricket
      <input type="checkbox" name="sport"> Kabaddi
    </form>
  36. 36.Which of these is a weak password? (a) riya2014 (b) Chai$Cup_19x (c) Rain#Drop_42! (d) Blue@Tiger_74
  37. 37.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 280px;
      justify-content: space-between;
    }
    Inside are 4 boxes, each 40px wide (no margins).
  38. 38.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 6 (d) 10
  39. 39.True or false: <h1>My Site</h1> goes in script.js. (a) True (b) False
  40. 40.True or false: <input type="text"> takes only numbers. (a) True (b) False

Answer key

  1. 134
  2. hosts websites online
  3. a code editor
  4. Yes
  5. #0000ff
  6. 4
  7. element
  8. the gap round content
  9. <img>
  10. color
  11. True
  12. in a new tab
  13. False
  14. 1
  15. 214
  16. margin
  17. a pop-up box
  18. False
  19. </b>
  20. weak
  21. for
  22. False
  23. <body>
  24. 9
  25. JavaScript
  26. red
  27. False
  28. <ol>
  29. 12
  30. purple
  31. http
  32. Blue@Tiger_74
  33. No
  34. <li>
  35. 4
  36. riya2014
  37. 40
  38. 6
  39. False
  40. False

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