← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 575 · 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.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 17; i = i + 2) {
      console.log(i);
    }
  2. 2.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <h2>Good morning!</h2>
    <p>My pets</p>
    <h2>I love mangoes.</h2>
  3. 3.🖌️ What colour are the letters?
    p {
      text-align: left;
      color: red;
      font-size: 28px;
      background-color: green;
    }
    (a) red (b) green (c) blue
  4. 4.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) Contact us (b) games.html (c) href (d) Visit the site
  5. 5.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="300">
    (a) dog.jpg (b) A happy dog (c) The full moon (d) width
  6. 6.📝 Which input type sends the form? (a) password (b) submit (c) email (d) date
  7. 7.🚀 Which file is best for the colours and fonts? (a) index.html (b) photo.jpg (c) style.css (d) script.js
  8. 8.🧭 Who is helped most by semantic tags? (a) only the server (b) nobody (c) only the printer (d) screen-reader users
  9. 9.📱 What does a media query check? (a) the time of day (b) the battery level (c) the page title (d) the screen width
  10. 10.🔐 Is 111111 a strong or a weak password? (a) weak (b) strong
  11. 11.What does justify-content: flex-end do? (a) puts boxes in the middle (b) packs boxes at the start (c) equal gaps, none at ends (d) packs boxes at the end
  12. 12.🔁 How many numbers does this code print?
    for (let i = 0; i < 8; i = i + 2) {
      console.log(i);
    }
  13. 13.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 140px;
      justify-content: flex-start;
    }
    Inside are 2 boxes, each 60px wide (no margins).
  14. 14.💬 Does the browser show comments on the page? (a) No (b) Yes
  15. 15.What does text-align do? (a) centres a heading (b) picks the font style (c) colours behind the text (d) sets the letter colour
  16. 16.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
    (a) numbers (b) bullets
  17. 17.🔁 What does this code print?
    let marks = 36;
    if (marks < 37) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Try again (b) Pass
  18. 18.Which of these is safe to do online? (a) post your home address (b) think before you post (c) click prize links (d) type a password on http
  19. 19.True or false: <table> holds the whole table. (a) False (b) True
  20. 20.⚡ What number does this code print?
    let marks = 7;
    marks = marks + 18;
    marks = marks - 1;
    console.log(marks);
  21. 21.✍️ What value is given to border in this rule?
    li {
      width: 300px;
      font-style: italic;
      border: 2px solid;
    }
    (a) italic (b) 300px (c) 2px solid (d) border
  22. 22.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>I love mangoes.</p>
    <h2>Cricket is fun.</h2>
  23. 23.Which of these goes in the head? (a) <a> (b) <ul> (c) <p> (d) <title>
  24. 24.🖌️ How big is the text, in px?
    li {
      background-color: white;
      font-size: 36px;
      text-align: center;
      color: blue;
    }
  25. 25.True or false: <ol> shows bullet points. (a) True (b) False
  26. 26.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h4>? (a) <h1> (b) <h5> (c) <h4> (d) <h2>
  27. 27.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) src (c) width (d) height
  28. 28.🔗 Which words do you click on?
    <a href="art.html">About us</a>
    (a) Contact us (b) href (c) About us (d) art.html
  29. 29.True or false: <p>Hello!</p> goes in script.js. (a) False (b) True
  30. 30.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 320px;
      justify-content: flex-end;
    }
    Inside are 3 boxes, each 80px wide (no margins).
  31. 31.⚡ What number does this code print?
    let a = 19;
    let b = 24;
    console.log(a + b);
  32. 32.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <p>My best friend</p>
  33. 33.🌍 What finds the server for a domain name like example.com? (a) HTML (b) DNS (c) alt (d) CSS
  34. 34.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>Fun facts</p> -->
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
  35. 35.Which of these is a closing tag? (a) <p> (b) </b> (c) <li> (d) <body>
  36. 36.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    <p>The red kite</p>
    <p>Good morning!</p>
  37. 37.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
  38. 38.📊 How many cells does this table have in all?
    <table>
      <tr><td>Guava</td><td>Jamun</td><td>Banana</td></tr>
      <tr><td>Guava</td><td>Papaya</td><td>Guava</td></tr>
      <tr><td>Mango</td><td>Guava</td><td>Orange</td></tr>
      <tr><td>Mango</td><td>Litchi</td><td>Banana</td></tr>
    </table>
  39. 39.♿ What does good colour contrast mean? (a) text stands out clearly (b) many bright colours (c) only red text (d) no colours at all
  40. 40.True or false: margin is space outside the border. (a) True (b) False

Answer key

  1. 16
  2. 2
  3. red
  4. Contact us
  5. A happy dog
  6. submit
  7. style.css
  8. screen-reader users
  9. the screen width
  10. weak
  11. packs boxes at the end
  12. 4
  13. 20
  14. No
  15. centres a heading
  16. numbers
  17. Pass
  18. think before you post
  19. True
  20. 24
  21. 2px solid
  22. 2
  23. <title>
  24. 36
  25. False
  26. <h1>
  27. width
  28. About us
  29. False
  30. 80
  31. 43
  32. 3
  33. DNS
  34. 1
  35. </b>
  36. 4
  37. 1
  38. 12
  39. text stands out clearly
  40. True

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