← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 488 · 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.📊 Where do <td> cells go? (a) inside a <tr> (b) inside the <head> (c) inside a <li> (d) inside a <p>
  2. 2.📋 What number does the browser show next to “Orange”?
    <ol start="2">
      <li>Litchi</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ol>
  3. 3.⚖️ What colour is the text of this element?
    <h1 class="box" id="main">Hi</h1>
    CSS:
    h1 { color: yellow; }
    .box { color: orange; }
    #main { color: white; }
    (a) white (b) yellow (c) orange (d) red
  4. 4.True or false: a code editor saves our .html files. (a) False (b) True
  5. 5.True or false: <hr> has a closing tag. (a) False (b) True
  6. 6.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Rivers flow<br>Sky is blue<br>Roses are red</p>
  7. 7.🔍 Which line is missing its closing tag?
    line 1: <strong>I love mangoes.</strong>
    line 2: <h2>Rain today
    line 3: <em>Cricket is fun.</em>
    (a) line 1 (b) line 3 (c) line 2
  8. 8.🔒 Is the connection to this address scrambled (encrypted)?
    http://www.example.net/maths/tables.html
    (a) No (b) Yes
  9. 9.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Grapes</li>
    </ul>
    (a) bullets (b) numbers
  10. 10.🏷️ Which is the closing tag for <i>? (a) <i/> (b) </i> (c) <\i> (d) <i>
  11. 11.🎯 Which element does the selector div style? (a) <h1 id="logo"> (b) <span> (c) <p class="note"> (d) <div class="note">
  12. 12.🎯 What kind of selector is .star? (a) an element selector (b) a class selector (c) an id selector
  13. 13.🖌️ What colour is behind the letters?
    h1 {
      background-color: white;
      color: orange;
      font-size: 12px;
      text-align: center;
    }
    (a) white (b) orange (c) red
  14. 14.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) F (d) J
  15. 15.✍️ What is the selector in this CSS rule?
    h1 {
      text-align: center;
      font-weight: bold;
      margin: 10px;
      color: red;
    }
    (a) text-align (b) p (c) h1 (d) bold
  16. 16.True or false: “write clear link text” makes the page harder to use. (a) False (b) True
  17. 17.📊 Which tag holds the whole table? (a) <tr> (b) <caption> (c) <th> (d) <table>
  18. 18.📊 How many rows does this table have?
    <table>
      <tr><td>Orange</td><td>Litchi</td><td>Mango</td><td>Orange</td></tr>
      <tr><td>Jamun</td><td>Litchi</td><td>Banana</td><td>Banana</td></tr>
    </table>
  19. 19.🔍 Which is the odd one out? (a) colours code to help us (b) shows line numbers (c) stores a website’s files (d) is where we type code
  20. 20.🎯 What kind of selector is #logo? (a) a class selector (b) an element selector (c) an id selector
  21. 21.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) neither (c) the later one (d) the first one
  22. 22.📱 The screen is 700px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 24px;
      }
    }
    (a) No (b) Yes
  23. 23.📝 What does a password box show instead of letters? (a) capital letters (b) numbers (c) dots (d) emojis
  24. 24.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  25. 25.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Fun facts (c) Rain today
  26. 26.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 7; i++) {
      total = total + i;
    }
    console.log(total);
  27. 27.True or false: to share your OTP is not safe. (a) True (b) False
  28. 28.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Jamun</td><td>Papaya</td><td>Guava</td></tr>
    </table>
  29. 29.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="50">
    (a) moon.png (b) Our school bus (c) The full moon (d) width
  30. 30.🔁 Which loop repeats code a set number of times? (a) for (b) else (c) if (d) let
  31. 31.🔒 Is the connection to this address scrambled (encrypted)?
    http://kids.example.org/maths/tables.html
    (a) No (b) Yes
  32. 32.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Rain today</p>
    <!-- <p>Fun facts</p> -->
    (a) Fun facts (b) Rain today (c) Good morning!
  33. 33.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) ( (d) <
  34. 34.True or false: #logo is an element selector. (a) True (b) False
  35. 35.💪 Which flexbox property lines boxes up across? (a) gap (b) flex-direction (c) display: flex (d) align-items
  36. 36.💪 Which justify-content value packs boxes at the start? (a) flex-start (b) center (c) flex-end (d) space-between
  37. 37.📝 What does <hr> draw? (a) a table (b) a picture (c) a line across the page (d) a link
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <strong>Rain today</strong>
    line 2: <p>Fun facts</p>
    line 3: <small>Our school trip
    (a) line 3 (b) line 2 (c) line 1
  39. 39.Which of these does JavaScript do? (a) gives the page structure (b) shows a pop-up message (c) puts a picture on a page (d) makes a form box
  40. 40.📊 How many cells are in each row?
    <table>
      <tr><td>Jamun</td><td>Guava</td></tr>
      <tr><td>Grapes</td><td>Litchi</td></tr>
      <tr><td>Banana</td><td>Jamun</td></tr>
      <tr><td>Orange</td><td>Papaya</td></tr>
    </table>

Answer key

  1. inside a <tr>
  2. 3
  3. white
  4. True
  5. False
  6. 4
  7. line 2
  8. No
  9. bullets
  10. </i>
  11. <div class="note">
  12. a class selector
  13. white
  14. F
  15. h1
  16. False
  17. <table>
  18. 2
  19. stores a website’s files
  20. an id selector
  21. the later one
  22. No
  23. dots
  24. a closing tag
  25. Fun facts
  26. 28
  27. True
  28. 3
  29. The full moon
  30. for
  31. No
  32. Fun facts
  33. <
  34. False
  35. align-items
  36. flex-start
  37. a line across the page
  38. line 3
  39. shows a pop-up message
  40. 2

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