← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 896 · 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.📝 How many <input> tags are in this form?
    <form>
      <input type="text">
      <input type="password">
      <input type="email">
      <input type="number">
      <input type="submit" value="Send">
    </form>
  2. 2.⚡ What does this code show?
    let name = "Aman";
    alert("Hello, " + name + "!");
    (a) Hello, name! (b) name (c) Aman (d) Hello, Aman!
  3. 3.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
  4. 4.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
    <p>Fun facts</p>
  5. 5.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) black (c) yellow (d) bright green
  6. 6.True or false: <footer> sits at the bottom. (a) False (b) True
  7. 7.🧩 Which language changes the page live? (a) HTML (b) CSS (c) JavaScript
  8. 8.🧩 Which language sets colours and fonts? (a) JavaScript (b) CSS (c) HTML
  9. 9.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <hr> (d) <ul>
  10. 10.🖌️ Where does the text sit on its line?
    li {
      font-size: 24px;
      color: black;
      text-align: center;
      background-color: white;
    }
    (a) in the middle (b) on the right (c) on the left
  11. 11.True or false: HTML on its own can keep a high score. (a) False (b) True
  12. 12.🌈 Which colour is #0000ff? (a) cyan (b) bright green (c) white (d) blue
  13. 13.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
  14. 14.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>My best friend</p> -->
    <p>Cricket is fun.</p>
  15. 15.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>
  16. 16.🌍 Which one asks for a web page? (a) HTTPS (b) the URL (c) the server (d) the browser
  17. 17.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <link> (d) <img>
  18. 18.True or false: HTML on its own can add up two numbers. (a) True (b) False
  19. 19.📊 Are <th> cells shown bold and centred by default? (a) No (b) Yes
  20. 20.🔐 Is S0lar!Pen#8 a strong or a weak password? (a) strong (b) weak
  21. 21.🌈 Which colour is #ffffff? (a) blue (b) cyan (c) red (d) white
  22. 22.🔍 Which is the odd one out? (a) shows pages from the web (b) opens web pages for us (c) has an address bar (d) shows line numbers
  23. 23.⚖️ What colour is the text of this element?
    <h1 class="star" id="logo">Hi</h1>
    CSS:
    h1 { color: green; }
    .star { color: yellow; }
    (a) black (b) green (c) white (d) yellow
  24. 24.🔍 Which line is missing its closing tag?
    line 1: <em>My pets</em>
    line 2: <h2>I love mangoes.
    line 3: <i>Hello, world!</i>
    (a) line 1 (b) line 2 (c) line 3
  25. 25.⚖️ Which selector is the weakest? (a) a class selector (b) an id selector (c) an element selector
  26. 26.🧩 Which language gives the page structure? (a) JavaScript (b) CSS (c) HTML
  27. 27.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue</p>
  28. 28.True or false: <li> is an empty tag. (a) True (b) False
  29. 29.🧭 Is <main> semantic or not semantic? (a) semantic (b) not semantic
  30. 30.Which of these is true of <nav>? (a) holds the logo and title (b) holds the menu of links (c) holds a side box of tips (d) is the page’s key part
  31. 31.True or false: <td> holds the whole table. (a) True (b) False
  32. 32.🎯 What kind of selector is p? (a) an element selector (b) a class selector (c) an id selector
  33. 33.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 7; i++) {
      total = total + i;
    }
    console.log(total);
  34. 34.⚡ What number does this code print?
    let runs = 22;
    runs = runs + 3;
    runs = runs - 7;
    console.log(runs);
  35. 35.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
  36. 36.🖌️ Where does the text sit on its line?
    h1 {
      color: red;
      font-size: 24px;
      background-color: orange;
      text-align: left;
    }
    (a) on the right (b) on the left (c) in the middle
  37. 37.⚡ What number does this code print?
    let a = 57;
    let b = 22;
    console.log(a + b);
  38. 38.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  39. 39.🔁 What does i++ do? (a) takes 1 from i (b) doubles i (c) adds 1 to i (d) prints i
  40. 40.✍️ How many declarations (property: value pairs) are in this rule?
    h2 {
      padding: 8px;
      font-weight: bold;
    }

Answer key

  1. 5
  2. Hello, Aman!
  3. on the browser tab
  4. 3
  5. yellow
  6. True
  7. JavaScript
  8. CSS
  9. <ul>
  10. in the middle
  11. False
  12. blue
  13. <ol>
  14. 2
  15. 6
  16. the browser
  17. <a>
  18. False
  19. Yes
  20. strong
  21. white
  22. shows line numbers
  23. yellow
  24. line 2
  25. an element selector
  26. HTML
  27. 2
  28. False
  29. semantic
  30. holds the menu of links
  31. False
  32. an element selector
  33. 28
  34. 18
  35. blue
  36. on the left
  37. 79
  38. an empty tag
  39. adds 1 to i
  40. 2

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