← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 116 · 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 hex code is cyan? (a) #ff0000 (b) #00ff00 (c) #ffff00 (d) #00ffff
  2. 2.🔗 Which address opens when you click this link?
    <a href="contact.html">Play games</a>
    (a) https://example.com (b) contact.html (c) Play games (d) maths.html
  3. 3.📊 How many rows does this table have?
    <table>
      <tr><td>Banana</td><td>Jamun</td><td>Jamun</td><td>Mango</td></tr>
      <tr><td>Orange</td><td>Orange</td><td>Jamun</td><td>Banana</td></tr>
      <tr><td>Mango</td><td>Jamun</td><td>Guava</td><td>Litchi</td></tr>
    </table>
  4. 4.🎯 Which CSS selector matches this element?
    <p class="red" id="hero">Hello</p>
    (a) #red (b) .hero (c) .box (d) p
  5. 5.Which of these is not safe to do online? (a) check for https first (b) keep passwords secret (c) use a strong password (d) download from pop-ups
  6. 6.True or false: HTML on its own can add up two numbers. (a) False (b) True
  7. 7.📝 Which input type sends the form? (a) text (b) password (c) submit (d) number
  8. 8.⚖️ What colour is the text of this element?
    <h1 class="star" id="main">Hi</h1>
    CSS:
    #main { color: blue; }
    #main { color: purple; }
    (a) green (b) purple (c) orange (d) blue
  9. 9.📝 How many <input> tags are in this form?
    <form>
      <input type="password">
      <input type="date">
      <input type="number">
      <input type="text">
      <input type="submit" value="Send">
    </form>
  10. 10.🌈 Which hex code is magenta? (a) #ffff00 (b) #00ff00 (c) #000000 (d) #ff00ff
  11. 11.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="fruit"> Litchi
      <input type="checkbox" name="fruit"> Mango
      <input type="checkbox" name="fruit"> Guava
    </form>
  12. 12.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) width (d) height
  13. 13.📊 Where do <td> cells go? (a) inside a <p> (b) inside the <head> (c) inside a <tr> (d) inside a <li>
  14. 14.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <p>My best friend</p>
    <!-- <p>Hello, world!</p> -->
    (a) Hello, world! (b) Good morning! (c) I love mangoes. (d) My best friend
  15. 15.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Our school trip</p>
    (a) My best friend (b) I love mangoes. (c) Our school trip
  16. 16.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="sport"> Kabaddi
      <input type="checkbox" name="sport"> Cricket
      <input type="checkbox" name="sport"> Chess
      <input type="checkbox" name="sport"> Football
      <input type="checkbox" name="sport"> Hockey
    </form>
  17. 17.True or false: a web browser opens web pages for us. (a) True (b) False
  18. 18.True or false: HTML on its own can keep a high score. (a) True (b) False
  19. 19.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
    (a) I love mangoes. (b) Cricket is fun. (c) My best friend (d) Hello, world!
  20. 20.True or false: <caption> holds the whole table. (a) True (b) False
  21. 21.⚡ What does this code print? (Look at the quotes!)
    let x = "3";
    let y = 8;
    console.log(x + y);
    (a) 38 (b) 11 (c) Error
  22. 22.🎨 Which tag connects an outside CSS file? (a) <css> (b) <img> (c) <link> (d) <a>
  23. 23.🔁 How many times does this code print “Welcome”?
    for (let i = 3; i <= 9; i++) {
      console.log("Welcome");
    }
  24. 24.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the shorter one (c) the first one (d) the later one
  25. 25.♿ Does this help everyone, or make the page harder to use: label every form box? (a) makes it harder (b) helps everyone
  26. 26.🔁 How many times does this code print “Hi”?
    for (let i = 2; i < 5; i++) {
      console.log("Hi");
    }
  27. 27.🖌️ What colour is behind the letters?
    h2 {
      background-color: red;
      color: purple;
      font-size: 24px;
      text-align: left;
    }
    (a) red (b) purple (c) white
  28. 28.What does font-weight do? (a) centres a heading (b) colours behind the text (c) makes the text bold (d) makes letters bigger
  29. 29.🌈 Which colour is #ffff00? (a) magenta (b) yellow (c) blue (d) red
  30. 30.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h3>Rain today</h3>
    <p>Hello, world!</p>
    <h2>The red kite</h2>
    <p>Hello, world!</p>
  31. 31.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) High Tech (c) Home Text (d) HyperText
  32. 32.📊 Which tag gives the table a title? (a) <th> (b) <td> (c) <caption> (d) <table>
  33. 33.📊 Which tag holds the whole table? (a) <tr> (b) <td> (c) <th> (d) <table>
  34. 34.True or false: a code editor sends pages over the net. (a) False (b) True
  35. 35.Which of these is a closing tag? (a) <title> (b) <li> (c) </title> (d) <h1>
  36. 36.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 320px;
      justify-content: flex-start;
    }
    Inside are 3 boxes, each 80px wide (no margins).
  37. 37.🌈 Which hex code is red? (a) #0000ff (b) #ffff00 (c) #ffffff (d) #ff0000
  38. 38.📄 Can HTML on its own make links to pages? (a) No (b) Yes
  39. 39.📝 Which input type takes only numbers? (a) text (b) number (c) checkbox (d) submit
  40. 40.🛡️ Should you share your password with your best friend? (a) Yes (b) No

Answer key

  1. #00ffff
  2. contact.html
  3. 3
  4. p
  5. download from pop-ups
  6. False
  7. submit
  8. purple
  9. 5
  10. #ff00ff
  11. 3
  12. height
  13. inside a <tr>
  14. Hello, world!
  15. I love mangoes.
  16. 5
  17. True
  18. False
  19. My best friend
  20. False
  21. 38
  22. <link>
  23. 7
  24. the later one
  25. helps everyone
  26. 3
  27. red
  28. makes the text bold
  29. yellow
  30. 3
  31. HyperText
  32. <caption>
  33. <table>
  34. False
  35. </title>
  36. 80
  37. #ff0000
  38. Yes
  39. number
  40. No

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