← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 686 · 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 one asks for a web page? (a) the URL (b) HTTPS (c) the server (d) the browser
  2. 2.🖌️ Where does the text sit on its line?
    h1 {
      font-size: 20px;
      text-align: right;
      background-color: black;
      color: purple;
    }
    (a) on the left (b) on the right (c) in the middle
  3. 3.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
  4. 4.What does font-family do? (a) sets the letter colour (b) picks the font style (c) colours behind the text (d) makes the text bold
  5. 5.Which of these has a closing tag? (a) <meta> (b) <br> (c) <hr> (d) <title>
  6. 6.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
    <!-- <p>Fun facts</p> -->
    <p>I love mangoes.</p>
  7. 7.True or false: to use a strong password is safe. (a) True (b) False
  8. 8.Which colour pair is easy to read? (a) pink on red (b) yellow on white (c) black on white (d) light grey on white
  9. 9.📄 Can HTML on its own pick a random number? (a) No (b) Yes
  10. 10.📊 How many rows does this table have?
    <table>
      <tr><td>Banana</td><td>Papaya</td><td>Banana</td><td>Jamun</td></tr>
      <tr><td>Guava</td><td>Jamun</td><td>Jamun</td><td>Litchi</td></tr>
    </table>
  11. 11.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h2> or <h6>? (a) <h2> (b) <h6> (c) <h5> (d) <h4>
  12. 12.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 18; i = i + 3) {
      console.log(i);
    }
  13. 13.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 9; i++) {
      total = total + i;
    }
    console.log(total);
  14. 14.Which of these is a closing tag? (a) </p> (b) <b> (c) <body> (d) <p>
  15. 15.🖌️ Where does the text sit on its line?
    h2 {
      font-size: 40px;
      text-align: center;
      background-color: red;
      color: white;
    }
    (a) on the left (b) on the right (c) in the middle
  16. 16.♿ A part of the page is under a <h1> heading. Which tag should its sub-heading use? (a) <h2> (b) <h1> (c) <h4> (d) <h5>
  17. 17.🎯 How many elements on a page should have the same id? (a) 5 (b) any number (c) 1 (d) 2
  18. 18.True or false: <table> goes in the body. (a) False (b) True
  19. 19.✍️ What value is given to text-align in this rule?
    .box {
      width: 300px;
      text-align: center;
      background-color: yellow;
    }
    (a) center (b) text-align (c) yellow (d) 10px
  20. 20.🧩 Which language lays out the page? (a) JavaScript (b) HTML (c) CSS
  21. 21.📦 In the box model, which part is space inside the border? (a) margin (b) padding (c) content (d) border
  22. 22.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  23. 23.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  24. 24.⚡ What number does this code print?
    let a = 4;
    let b = 2;
    console.log(a * b);
  25. 25.✍️ What is the selector in this CSS rule?
    #top {
      font-size: 20px;
      padding: 8px;
    }
    (a) 8px (b) font-size (c) li (d) #top
  26. 26.What does background-color do? (a) sets the letter colour (b) centres a heading (c) makes letters bigger (d) colours behind the text
  27. 27.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 14px;
      }
    }
  28. 28.📊 In a table, which tag is a row? (a) <td> (b) <th> (c) <tb> (d) <tr>
  29. 29.True or false: the border is the line round the box. (a) True (b) False
  30. 30.Which of these is true of <header>? (a) holds a news story (b) sits at the bottom (c) is the page’s key part (d) holds the logo and title
  31. 31.♿ What does good colour contrast mean? (a) many bright colours (b) only red text (c) no colours at all (d) text stands out clearly
  32. 32.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Guava</td><td>Mango</td><td>Papaya</td><td>Grapes</td></tr>
      <tr><td>Banana</td><td>Mango</td><td>Orange</td><td>Orange</td></tr>
    </table>
  33. 33.🔗 Which words do you click on?
    <a href="quiz.html">Maths fun</a>
    (a) quiz.html (b) Maths fun (c) Art corner (d) href
  34. 34.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <h1> (d) <br>
  35. 35.True or false: the URL is the page’s address. (a) False (b) True
  36. 36.True or false: <p> goes in the body. (a) False (b) True
  37. 37.📦 In the box model, which part is the text or picture? (a) margin (b) padding (c) border (d) content
  38. 38.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
    (a) numbers (b) bullets
  39. 39.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  40. 40.What does font-weight do? (a) centres a heading (b) sets the letter colour (c) makes the text bold (d) makes letters bigger

Answer key

  1. the browser
  2. on the right
  3. 255
  4. picks the font style
  5. <title>
  6. 2
  7. True
  8. black on white
  9. No
  10. 2
  11. <h6>
  12. 15
  13. 45
  14. </p>
  15. in the middle
  16. <h2>
  17. 1
  18. True
  19. center
  20. CSS
  21. padding
  22. in the head
  23. an opening tag
  24. 8
  25. #top
  26. colours behind the text
  27. 14
  28. <tr>
  29. True
  30. holds the logo and title
  31. text stands out clearly
  32. 3
  33. Maths fun
  34. <h1>
  35. True
  36. True
  37. content
  38. numbers
  39. in a new tab
  40. makes the text bold

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