← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 698 · 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 of these is a weak password? (a) Chai$Cup_19x (b) iloveyou (c) Blue@Tiger_74 (d) Rain#Drop_42!
  2. 2.🌍 What is the protocol in this URL?
    https://www.example.com/maths/tables.html
    (a) https (b) www.example.com (c) http (d) /maths/tables.html
  3. 3.⚡ What does this code print? (Look at the quotes!)
    let x = "1";
    let y = 7;
    console.log(x + y);
    (a) 17 (b) 8 (c) Error
  4. 4.🔢 On a typical page, from top to bottom, which comes FIRST? (a) <header> (b) <main> (c) <footer> (d) <nav>
  5. 5.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) height (d) alt
  6. 6.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  7. 7.Which colour pair is easy to read? (a) pink on red (b) yellow on white (c) blue on purple (d) white on black
  8. 8.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 140px;
      padding: 30px;
      border: 5px solid black;
      margin: 0px;
    }
  9. 9.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Our school trip (c) I love mangoes.
  10. 10.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 230px;
      padding: 5px;
      border: 1px solid black;
      margin: 20px;
    }
  11. 11.🎯 What kind of selector is li? (a) an id selector (b) an element selector (c) a class selector
  12. 12.🔗 Which address opens when you click this link?
    <a href="about.html">Play games</a>
    (a) about.html (b) https://example.com (c) contact.html (d) Play games
  13. 13.🎯 Which element does the selector #hero style? (a) <div id="top"> (b) <div id="hero"> (c) <div class="hero"> (d) <span class="big">
  14. 14.🌍 What is the path in this URL?
    http://www.example.com/art/gallery.html
    (a) /art/gallery.html (b) http (c) /news/today.html (d) www.example.com
  15. 15.✍️ What value is given to text-align in this rule?
    .box {
      text-align: center;
      font-style: italic;
    }
    (a) center (b) text-align (c) 10px (d) yellow
  16. 16.🏷️ Every HTML tag starts with which sign? (a) ( (b) < (c) [ (d) {
  17. 17.📱 What does a media query check? (a) the battery level (b) the page title (c) the time of day (d) the screen width
  18. 18.🔁 What does this code print?
    let score = 2;
    if (score > 43) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) You win (b) Play again
  19. 19.💪 Which justify-content value equal gaps, none at ends? (a) center (b) flex-end (c) space-between (d) flex-start
  20. 20.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Orange</td><td>Grapes</td></tr>
      <tr><td>Guava</td><td>Guava</td></tr>
    </table>
  21. 21.📝 How many <input> tags are in this form?
    <form>
      <input type="number">
      <input type="text">
      <input type="submit" value="Send">
    </form>
  22. 22.🔗 Where does this link open?
    <a href="about.html" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab
  23. 23.True or false: <td> holds the whole table. (a) False (b) True
  24. 24.🛡️ Should you share your password with your best friend? (a) No (b) Yes
  25. 25.Which of these does HTML do? (a) checks a quiz answer (b) sets colours and fonts (c) gives the page structure (d) changes the page live
  26. 26.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="100">
    (a) Map of India (b) kite.png (c) A red kite (d) width
  27. 27.🔁 When does the else part run? (a) always (b) when if is false (c) never (d) when if is true
  28. 28.📊 How many cells does this table have in all?
    <table>
      <tr><td>Litchi</td><td>Guava</td><td>Mango</td></tr>
      <tr><td>Papaya</td><td>Grapes</td><td>Orange</td></tr>
      <tr><td>Banana</td><td>Jamun</td><td>Jamun</td></tr>
      <tr><td>Orange</td><td>Orange</td><td>Banana</td></tr>
    </table>
  29. 29.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  30. 30.🔒 Is the connection to this address scrambled (encrypted)?
    https://www.example.com/maths/tables.html
    (a) No (b) Yes
  31. 31.True or false: a code editor has an address bar. (a) False (b) True
  32. 32.📊 Which tag gives the table a title? (a) <th> (b) <caption> (c) <tr> (d) <table>
  33. 33.Which of these is not safe to do online? (a) tell a trusted adult (b) share your OTP (c) ask before downloading (d) think before you post
  34. 34.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
  35. 35.⚖️ Which selector is the strongest? (a) an element selector (b) a class selector (c) an id selector
  36. 36.🔐 Is iloveyou a strong or a weak password? (a) strong (b) weak
  37. 37.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <img> (d) <link>
  38. 38.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <h6> (d) <p>
  39. 39.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 5; i = i + 2) {
      console.log(i);
    }
  40. 40.🧭 Which semantic tag holds the logo and title? (a) <header> (b) <main> (c) <footer> (d) <nav>

Answer key

  1. iloveyou
  2. https
  3. 17
  4. <header>
  5. alt
  6. an opening tag
  7. white on black
  8. 210
  9. Our school trip
  10. 242
  11. an element selector
  12. about.html
  13. <div id="hero">
  14. /art/gallery.html
  15. center
  16. <
  17. the screen width
  18. Play again
  19. space-between
  20. 2
  21. 3
  22. in a new tab
  23. False
  24. No
  25. gives the page structure
  26. A red kite
  27. when if is false
  28. 12
  29. a closing tag
  30. Yes
  31. False
  32. <caption>
  33. share your OTP
  34. red
  35. an id selector
  36. weak
  37. <a>
  38. <h1>
  39. 4
  40. <header>

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