← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 29 · 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 property is set to bold in this rule?
    h2 {
      font-weight: bold;
      font-size: 20px;
    }
    (a) bold (b) border (c) width (d) font-weight
  2. 2.Which of these goes in the head? (a) <h1> (b) <meta charset="utf-8"> (c) <ul> (d) <table>
  3. 3.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 110px;
      padding: 30px;
      border: 2px solid black;
      margin: 10px;
    }
  4. 4.⚡ What number does this code print?
    let runs = 24;
    runs = runs + 14;
    runs = runs - 33;
    console.log(runs);
  5. 5.♿ Who uses a screen reader? (a) only teachers (b) only robots (c) people who are blind (d) only coders
  6. 6.Which of these is a closing tag? (a) <p> (b) <li> (c) <body> (d) </li>
  7. 7.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 10px;
      }
    }
  8. 8.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <p>My best friend</p>
    <p>Rain today</p>
    (a) My best friend (b) Rain today (c) My pets (d) I love mangoes.
  9. 9.💪 Which flexbox property picks row or column? (a) justify-content (b) align-items (c) gap (d) flex-direction
  10. 10.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <p>Good morning!</p>
    <!-- <p>Hello, world!</p> -->
  11. 11.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) red (c) bright green (d) cyan
  12. 12.💪 Which justify-content value puts boxes in the middle? (a) flex-end (b) space-between (c) center (d) flex-start
  13. 13.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Jamun</td><td>Papaya</td></tr>
    </table>
  14. 14.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ol>
  15. 15.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  16. 16.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  17. 17.💪 Which justify-content value equal gaps, none at ends? (a) center (b) flex-start (c) flex-end (d) space-between
  18. 18.📋 Which list suits a shopping list in any order? (a) <ul> (b) <ol> (c) <hr> (d) <br>
  19. 19.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine<br>Rivers flow<br>Kites fly high<br>Sky is blue</p>
  20. 20.Which of these is true of a web browser? (a) is where we type code (b) saves our .html files (c) colours code to help us (d) opens web pages for us
  21. 21.🔍 One closing tag is missing. Which one?
    <h3>Fun facts</h3>
    <h1>My pets
    <b>Hello, world!</b>
    (a) </h3> (b) </p> (c) </h1> (d) </b>
  22. 22.True or false: <ol> lists things in any order. (a) True (b) False
  23. 23.🎯 Which sign starts a class selector? (a) & (b) # (c) . (d) @
  24. 24.True or false: <ul> shows 1, 2, 3 numbers. (a) True (b) False
  25. 25.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is fast (b) the site is a game (c) the data is scrambled (d) the site is free
  26. 26.True or false: the server stores the site’s files. (a) False (b) True
  27. 27.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 3; i++) {
      total = total + i;
    }
    console.log(total);
  28. 28.🔍 Which line is missing its closing tag?
    line 1: <strong>Fun facts</strong>
    line 2: <p>My pets</p>
    line 3: <em>Our school trip
    (a) line 3 (b) line 2 (c) line 1
  29. 29.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
  30. 30.🚀 What is the home page file of a website usually called? (a) home.css (b) start.js (c) index.html (d) main.png
  31. 31.🔍 One closing tag is missing. Which one?
    <h2>Rain today</h2>
    <em>Cricket is fun.</em>
    <i>Hello, world!
    (a) </h1> (b) </i> (c) </em> (d) </h2>
  32. 32.📱 The screen is 820px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 18px;
      }
    }
    (a) No (b) Yes
  33. 33.⚖️ What colour is the text of this element?
    <h2 class="big" id="end">Hi</h2>
    CSS:
    h2 { color: orange; }
    #end { color: purple; }
    .big { color: black; }
    (a) orange (b) black (c) purple (d) red
  34. 34.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) A happy dog (b) dog.jpg (c) The full moon (d) width
  35. 35.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 100px;
      justify-content: center;
    }
    Inside are 2 boxes, each 40px wide (no margins).
  36. 36.Which of these has a closing tag? (a) <img> (b) <br> (c) <p> (d) <meta>
  37. 37.🎨 Which attribute adds CSS inside one tag? (a) href (b) alt (c) style (d) src
  38. 38.🌍 Which one shows the page to you? (a) the server (b) the URL (c) HTTPS (d) the browser
  39. 39.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h1> or <h3>? (a) <h1> (b) <h3> (c) <h6> (d) <h2>
  40. 40.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) cyan (c) black (d) magenta

Answer key

  1. font-weight
  2. <meta charset="utf-8">
  3. 194
  4. 5
  5. people who are blind
  6. </li>
  7. 12
  8. My pets
  9. flex-direction
  10. 2
  11. cyan
  12. center
  13. 2
  14. 3
  15. has a closing tag
  16. in the body
  17. space-between
  18. <ul>
  19. 5
  20. opens web pages for us
  21. </h1>
  22. False
  23. .
  24. False
  25. the data is scrambled
  26. True
  27. 6
  28. line 3
  29. href
  30. index.html
  31. </i>
  32. No
  33. purple
  34. A happy dog
  35. 10
  36. <p>
  37. style
  38. the browser
  39. <h6>
  40. bright green

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