← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 76 · 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.True or false: a web server opens web pages for us. (a) False (b) True
  2. 2.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 130px;
      padding: 30px;
      border: 3px solid black;
      margin: 5px;
    }
  3. 3.🚀 Which file is best for code that reacts to clicks? (a) index.html (b) style.css (c) script.js (d) notes.txt
  4. 4.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 310px;
      justify-content: flex-end;
    }
    Inside are 4 boxes, each 60px wide (no margins).
  5. 5.⚡ What does this code show?
    let name = "Riya";
    console.log("Well done, " + name + "!");
    (a) Well done, Riya! (b) name (c) Riya (d) Well done, name!
  6. 6.⚖️ What colour is the text of this element?
    <h2 class="red" id="logo">Hi</h2>
    CSS:
    #logo { color: white; }
    #logo { color: green; }
    (a) white (b) purple (c) orange (d) green
  7. 7.✍️ Which sign ends each CSS declaration? (a) : (b) ; (c) . (d) ,
  8. 8.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="sport"> Kabaddi
      <input type="radio" name="sport"> Chess
      <input type="radio" name="sport"> Hockey
      <input type="radio" name="sport"> Cricket
    </form>
  9. 9.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ol> (d) <ul>
  10. 10.🔁 What does this code print?
    let score = 22;
    if (score < 29) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) You win (b) Play again
  11. 11.🌗 Is yellow on white easy or hard to read? (a) hard to read (b) easy to read
  12. 12.🔢 To build and share your first web page, which comes first: “write the HTML” or “add CSS styles”? (a) add CSS styles (b) write the HTML
  13. 13.Which of these is a strong password? (a) Chai$Cup_19x (b) abcd1234 (c) 123456 (d) password
  14. 14.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  15. 15.🔍 Which is the odd one out? (a) makes a link (b) changes the page live (c) gives the page structure (d) makes headings and lists
  16. 16.Which of these is true of a web server? (a) shows line numbers (b) sends pages over the net (c) opens web pages for us (d) shows pages from the web
  17. 17.⚡ What does this code show?
    let name = "Riya";
    alert("Hello, " + name + "!");
    (a) name (b) Riya (c) Hello, name! (d) Hello, Riya!
  18. 18.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 8; i = i + 4) {
      console.log(i);
    }
  19. 19.🖌️ Which CSS property colours behind the text? (a) background-color (b) text-align (c) font-size (d) color
  20. 20.True or false: .big is a class selector. (a) True (b) False
  21. 21.What is <input type="text"> for? (a) sends the form (b) takes only numbers (c) lets you pick only one (d) is for one line of words
  22. 22.🧭 Which semantic tag helps you move around? (a) <header> (b) <aside> (c) <nav> (d) <footer>
  23. 23.📄 Can HTML on its own keep a high score? (a) No (b) Yes
  24. 24.📱 The screen is 1100px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 16px;
      }
    }
    (a) Yes (b) No
  25. 25.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 1 (c) 10 (d) 3
  26. 26.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) src (d) height
  27. 27.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Rain today</p>
    <p>The red kite</p>
  28. 28.🔢 To build and share your first web page, which comes first: “add CSS styles” or “test in a browser”? (a) test in a browser (b) add CSS styles
  29. 29.✍️ What value is given to margin in this rule?
    li {
      margin: 10px;
      background-color: yellow;
      color: red;
    }
    (a) bold (b) 8px (c) 10px (d) margin
  30. 30.📝 What does <hr> draw? (a) a line across the page (b) a link (c) a picture (d) a table
  31. 31.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h4>My pets</h4>
    <h2>The red kite</h2>
    <h2>Fun facts</h2>
  32. 32.Which of these is true of <header>? (a) holds copyright notes (b) helps you move around (c) sits at the very top (d) holds a news story
  33. 33.Which of these is an opening tag? (a) </b> (b) </p> (c) </h1> (d) <p>
  34. 34.🔢 In a basic web page file, which comes first: “<html>” or “<head>”? (a) <head> (b) <html>
  35. 35.Which colour pair is hard to read? (a) black on white (b) yellow on black (c) dark grey on white (d) yellow on white
  36. 36.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
  37. 37.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Guava</li>
    </ul>
  38. 38.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Mango</td><td>Grapes</td><td>Litchi</td></tr>
      <tr><td>Grapes</td><td>Guava</td><td>Mango</td></tr>
      <tr><td>Orange</td><td>Banana</td><td>Orange</td></tr>
    </table>
  39. 39.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) < (d) [
  40. 40.⚖️ What colour is the text of this element?
    <h2 class="big" id="logo">Hi</h2>
    CSS:
    #logo { color: blue; }
    #logo { color: purple; }
    (a) black (b) green (c) blue (d) purple

Answer key

  1. False
  2. 196
  3. script.js
  4. 70
  5. Well done, Riya!
  6. green
  7. ;
  8. 1
  9. <li>
  10. You win
  11. hard to read
  12. write the HTML
  13. Chai$Cup_19x
  14. No
  15. changes the page live
  16. sends pages over the net
  17. Hello, Riya!
  18. 4
  19. background-color
  20. True
  21. is for one line of words
  22. <nav>
  23. No
  24. Yes
  25. 1
  26. src
  27. 3
  28. add CSS styles
  29. 10px
  30. a line across the page
  31. 4
  32. sits at the very top
  33. <p>
  34. <html>
  35. yellow on white
  36. Yes
  37. 2
  38. 12
  39. <
  40. purple

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