← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 690 · 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.🔒 Is the connection to this address scrambled (encrypted)?
    https://school.example.in/games/chess.html
    (a) Yes (b) No
  2. 2.🔗 Where does this link open?
    <a href="https://example.com">Maths fun</a>
    (a) in a new tab (b) in the same tab
  3. 3.🔍 Which is the odd one out? (a) sets colours and fonts (b) lays out the page (c) makes a form box (d) changes the text size
  4. 4.📋 Which list suits a shopping list in any order? (a) <br> (b) <ul> (c) <ol> (d) <hr>
  5. 5.⚖️ What colour is the text of this element?
    <p class="star" id="end">Hi</p>
    CSS:
    .star { color: blue; }
    .star { color: red; }
    (a) black (b) purple (c) red (d) blue
  6. 6.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 140px;
      justify-content: flex-end;
    }
    Inside are 2 boxes, each 50px wide (no margins).
  7. 7.🔁 What does this code print?
    let age = 3;
    if (age >= 15) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  8. 8.🔍 Which is the odd one out? (a) checks a quiz answer (b) shows a pop-up message (c) adds space around boxes (d) reacts to a button click
  9. 9.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h2> or <h5>? (a) <h3> (b) <h4> (c) <h5> (d) <h2>
  10. 10.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
  11. 11.📦 In the box model, which part is space outside the border? (a) content (b) margin (c) border (d) padding
  12. 12.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 10 (d) 4
  13. 13.🖌️ What colour are the letters?
    p {
      color: green;
      background-color: white;
      font-size: 20px;
      text-align: right;
    }
    (a) black (b) white (c) green
  14. 14.📝 Which input type is for an email address? (a) submit (b) text (c) radio (d) email
  15. 15.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  16. 16.🌐 Which one saves our .html files? (a) a web server (b) a code editor (c) a web browser
  17. 17.📦 In the box model, which part is a solid or dotted edge? (a) content (b) border (c) padding (d) margin
  18. 18.✍️ How does a CSS comment start? (a) // (b) /* (c) # (d) <!--
  19. 19.🔠 Are headings shown in bold by default? (a) No (b) Yes
  20. 20.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h2> or <h1>? (a) <h1> (b) <h3> (c) <h2> (d) <h6>
  21. 21.✍️ What is the selector in this CSS rule?
    #top {
      font-weight: bold;
      color: red;
    }
    (a) li (b) font-weight (c) #top (d) red
  22. 22.🌐 Which one hosts websites online? (a) a web server (b) a web browser (c) a code editor
  23. 23.🔁 What does this code print?
    let score = 40;
    if (score > 28) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) Play again (b) You win
  24. 24.🔍 Which line is missing its closing tag?
    line 1: <b>Cricket is fun.
    line 2: <h2>The red kite</h2>
    line 3: <i>Rain today</i>
    (a) line 2 (b) line 1 (c) line 3
  25. 25.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>The red kite</p>
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
    <!-- <p>My best friend</p> -->
  26. 26.Which of these is not safe to do online? (a) put secrets in comments (b) tell a trusted adult (c) use a strong password (d) keep passwords secret
  27. 27.Which of these is safe to do online? (a) click prize links (b) post your home address (c) use a strong password (d) type a password on http
  28. 28.🖌️ What colour is behind the letters?
    li {
      color: green;
      font-size: 40px;
      background-color: blue;
      text-align: left;
    }
    (a) purple (b) green (c) blue
  29. 29.🔢 When you open a web page, which comes first: “DNS finds the server” or “the browser shows it”? (a) DNS finds the server (b) the browser shows it
  30. 30.🔍 Which line is missing its closing tag?
    line 1: <h1>I love mangoes.
    line 2: <i>Good morning!</i>
    line 3: <p>The red kite</p>
    (a) line 2 (b) line 3 (c) line 1
  31. 31.✍️ In color: blue; which part is the property? (a) blue (b) color (c) ; (d) :
  32. 32.✍️ Which sign goes between a property and its value? (a) - (b) = (c) : (d) ;
  33. 33.📱 The screen is 414px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 14px;
      }
    }
    (a) Yes (b) No
  34. 34.💬 How does an HTML comment start? (a) /* (b) # (c) // (d) <!--
  35. 35.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 260px;
      padding: 10px;
      border: 3px solid black;
      margin: 5px;
    }
  36. 36.🌈 Which colour is #00ffff? (a) yellow (b) white (c) cyan (d) bright green
  37. 37.🚀 Which file should this code go in: let score = 0; (a) script.js (b) style.css (c) index.html
  38. 38.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <ol> (d) <p>
  39. 39.🔗 Which address opens when you click this link?
    <a href="contact.html">Contact us</a>
    (a) contact.html (b) Contact us (c) maths.html (d) https://example.com
  40. 40.🖼️ Which attribute of <img> names the picture file? (a) alt (b) height (c) width (d) src

Answer key

  1. Yes
  2. in the same tab
  3. makes a form box
  4. <ul>
  5. red
  6. 40
  7. child
  8. adds space around boxes
  9. <h5>
  10. <ol>
  11. margin
  12. 6
  13. green
  14. email
  15. in the body
  16. a code editor
  17. border
  18. /*
  19. Yes
  20. <h1>
  21. #top
  22. a web server
  23. You win
  24. line 1
  25. 3
  26. put secrets in comments
  27. use a strong password
  28. blue
  29. DNS finds the server
  30. line 1
  31. color
  32. :
  33. Yes
  34. <!--
  35. 286
  36. cyan
  37. script.js
  38. <li>
  39. contact.html
  40. src

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