← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 491 · 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.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="150">
    (a) width (b) fort.jpg (c) A tiger asleep (d) An old fort
  2. 2.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <h1> (d) <p>
  3. 3.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) white (c) red (d) black
  4. 4.🔢 To build and share your first web page, which comes LAST? (a) write the HTML (b) plan what to show (c) publish it online (d) add CSS styles
  5. 5.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    <p>The red kite</p>
    (a) The red kite (b) My pets (c) Hello, world! (d) I love mangoes.
  6. 6.🔢 To build and share your first web page, which comes first: “plan what to show” or “add CSS styles”? (a) plan what to show (b) add CSS styles
  7. 7.✍️ How many declarations (property: value pairs) are in this rule?
    .note {
      margin: 10px;
      color: red;
      font-size: 20px;
    }
  8. 8.Which of these is safe to do online? (a) share your password (b) put secrets in comments (c) type a password on http (d) use a nickname in games
  9. 9.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Space Facts (b) body (c) Welcome! (d) We won by 5 runs.
  10. 10.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 250px;
      justify-content: space-between;
    }
    Inside are 4 boxes, each 40px wide (no margins).
  11. 11.🌈 In #0000af the blue part is the hex number af. What is it as a normal number?
  12. 12.💬 How does an HTML comment start? (a) <!-- (b) // (c) # (d) /*
  13. 13.💪 Which flexbox property spaces boxes along a row? (a) align-items (b) display: flex (c) justify-content (d) gap
  14. 14.🔍 Which line is missing its closing tag?
    line 1: <small>Good morning!</small>
    line 2: <h1>Fun facts</h1>
    line 3: <h3>I love mangoes.
    (a) line 2 (b) line 1 (c) line 3
  15. 15.What does justify-content: space-between do? (a) puts boxes in the middle (b) equal gaps, none at ends (c) packs boxes at the end (d) packs boxes at the start
  16. 16.💬 Does the browser show comments on the page? (a) No (b) Yes
  17. 17.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
  18. 18.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Jamun</td><td>Jamun</td></tr>
      <tr><td>Litchi</td><td>Guava</td></tr>
      <tr><td>Papaya</td><td>Grapes</td></tr>
    </table>
  19. 19.True or false: <tr> holds the whole table. (a) True (b) False
  20. 20.📱 Which tag helps phones show a page at the right size? (a) the title tag (b) the br tag (c) the viewport meta tag (d) the hr tag
  21. 21.True or false: JavaScript makes headings and lists. (a) False (b) True
  22. 22.🚀 Which file is best for the colours and fonts? (a) index.html (b) style.css (c) photo.jpg (d) script.js
  23. 23.True or false: HTML makes a link. (a) True (b) False
  24. 24.True or false: JavaScript changes the text size. (a) False (b) True
  25. 25.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
    <p>The red kite</p>
    (a) The red kite (b) Our school trip (c) Rain today
  26. 26.💪 Which justify-content value packs boxes at the start? (a) flex-end (b) space-between (c) flex-start (d) center
  27. 27.True or false: <li> has a closing tag. (a) True (b) False
  28. 28.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the later one (c) the first one (d) the shorter one
  29. 29.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 24px;
      }
    }
  30. 30.🔁 Which loop repeats code a set number of times? (a) if (b) else (c) for (d) let
  31. 31.True or false: HTML on its own can add up two numbers. (a) False (b) True
  32. 32.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h4> or <h1>? (a) <h6> (b) <h2> (c) <h1> (d) <h4>
  33. 33.Which of these goes in the head? (a) <ul> (b) <link rel="stylesheet"> (c) <a> (d) <table>
  34. 34.🧭 Is <span> semantic or not semantic? (a) semantic (b) not semantic
  35. 35.📱 The screen is 1100px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 10px;
      }
    }
    (a) No (b) Yes
  36. 36.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Papaya</td><td>Grapes</td><td>Orange</td></tr>
      <tr><td>Papaya</td><td>Grapes</td><td>Jamun</td></tr>
    </table>
  37. 37.🔍 Which line is missing its closing tag?
    line 1: <strong>Good morning!</strong>
    line 2: <h1>Hello, world!</h1>
    line 3: <h2>Rain today
    (a) line 2 (b) line 3 (c) line 1
  38. 38.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 5; i++) {
      total = total + 6;
    }
    console.log(total);
  39. 39.📋 What number does the browser show next to “Mango”?
    <ol start="5">
      <li>Grapes</li>
      <li>Guava</li>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  40. 40.True or false: <p> has a closing tag. (a) False (b) True

Answer key

  1. An old fort
  2. <h6>
  3. blue
  4. publish it online
  5. I love mangoes.
  6. plan what to show
  7. 3
  8. use a nickname in games
  9. Welcome!
  10. 30
  11. 175
  12. <!--
  13. justify-content
  14. line 3
  15. equal gaps, none at ends
  16. No
  17. 200
  18. 4
  19. False
  20. the viewport meta tag
  21. False
  22. style.css
  23. True
  24. False
  25. Rain today
  26. flex-start
  27. True
  28. the later one
  29. 24
  30. for
  31. False
  32. <h1>
  33. <link rel="stylesheet">
  34. not semantic
  35. No
  36. 9
  37. line 3
  38. 30
  39. 7
  40. True

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