← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 275 · 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 link text is clearest? (a) here (b) Read the fruit facts (c) click here (d) link
  2. 2.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>My pets</p>
    <p>My best friend</p>
    <h2>Hello, world!</h2>
  3. 3.⚡ Which JavaScript word writes in the console? (a) for (b) let (c) alert() (d) console.log()
  4. 4.🖌️ What colour is behind the letters?
    h1 {
      font-size: 20px;
      text-align: left;
      color: blue;
      background-color: red;
    }
    (a) blue (b) red (c) white
  5. 5.⚡ Which JavaScript word makes a new variable? (a) console.log() (b) let (c) for (d) if
  6. 6.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Grapes</td><td>Banana</td></tr>
    </table>
  7. 7.Which of these goes in the body? (a) <style> (b) <p> (c) <link rel="stylesheet"> (d) <meta charset="utf-8">
  8. 8.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) a comment (d) an attribute
  9. 9.♿ Does this help everyone, or make the page harder to use: add alt text to images? (a) helps everyone (b) makes it harder
  10. 10.⚖️ What colour is the text of this element?
    <p class="note" id="top">Hi</p>
    CSS:
    p { color: red; }
    p { color: black; }
    (a) red (b) green (c) black (d) yellow
  11. 11.True or false: to type a password on http is safe. (a) False (b) True
  12. 12.🔁 How many numbers does this code print?
    for (let i = 0; i < 11; i = i + 3) {
      console.log(i);
    }
  13. 13.⚡ What number does this code print?
    let a = 25;
    let b = 32;
    console.log(a + b);
  14. 14.🌍 What is the protocol in this URL?
    https://kids.example.org/art/gallery.html
    (a) /art/gallery.html (b) http (c) kids.example.org (d) https
  15. 15.🔗 Which address opens when you click this link?
    <a href="about.html">About us</a>
    (a) https://example.com (b) About us (c) contact.html (d) about.html
  16. 16.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </html> (c) </head> (d) <html>
  17. 17.📱 The screen is 540px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 20px;
      }
    }
    (a) Yes (b) No
  18. 18.⚖️ Which selector is the strongest? (a) a class selector (b) an element selector (c) an id selector
  19. 19.🔢 When you open a web page, which comes FIRST? (a) DNS finds the server (b) the browser shows it (c) you type the URL (d) the server sends files
  20. 20.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="colour"> Orange
      <input type="checkbox" name="colour"> Red
      <input type="checkbox" name="colour"> Green
      <input type="checkbox" name="colour"> Pink
    </form>
  21. 21.🔁 How many times does this code print “Hi”?
    for (let i = 3; i < 7; i++) {
      console.log("Hi");
    }
  22. 22.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h6> or <h4>? (a) <h4> (b) <h6> (c) <h1> (d) <h2>
  23. 23.🔍 Which is the odd one out? (a) gives the page structure (b) makes headings and lists (c) reacts to a button click (d) makes a form box
  24. 24.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Grapes</td><td>Papaya</td></tr>
    </table>
  25. 25.Which of these is a weak password? (a) Blue@Tiger_74 (b) S0lar!Pen#8 (c) Chai$Cup_19x (d) qwerty
  26. 26.🔁 When does the else part run? (a) never (b) when if is false (c) always (d) when if is true
  27. 27.🖌️ What colour are the letters?
    h1 {
      background-color: white;
      text-align: left;
      font-size: 20px;
      color: green;
    }
    (a) blue (b) green (c) white
  28. 28.📊 In a table, which tag is a row? (a) <td> (b) <th> (c) <tr> (d) <tb>
  29. 29.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h2>My best friend</h2>
    <p>Hello, world!</p>
    <p>Fun facts</p>
  30. 30.True or false: JavaScript changes the page live. (a) False (b) True
  31. 31.True or false: to tell a trusted adult is safe. (a) True (b) False
  32. 32.🔍 Which line is missing its closing tag?
    line 1: <small>I love mangoes.
    line 2: <strong>The red kite</strong>
    line 3: <u>My pets</u>
    (a) line 1 (b) line 3 (c) line 2
  33. 33.🛡️ Online: is it safe to log out on shared PCs? (a) safe (b) not safe
  34. 34.🔗 Which words do you click on?
    <a href="https://example.com">Art corner</a>
    (a) href (b) School news (c) https://example.com (d) Art corner
  35. 35.Which of these is true of a code editor? (a) stores a website’s files (b) opens web pages for us (c) shows pages from the web (d) is where we type code
  36. 36.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h3>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
  37. 37.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) type the password (b) click it twice (c) share it with friends (d) close it, tell an adult
  38. 38.🌐 Which one answers page requests? (a) a code editor (b) a web server (c) a web browser
  39. 39.True or false: <ol> is one item of a list. (a) False (b) True
  40. 40.📝 Which tag holds a whole form? (a) <table> (b) <ol> (c) <input> (d) <form>

Answer key

  1. Read the fruit facts
  2. 3
  3. console.log()
  4. red
  5. let
  6. 2
  7. <p>
  8. an attribute
  9. helps everyone
  10. black
  11. False
  12. 4
  13. 57
  14. https
  15. about.html
  16. </html>
  17. No
  18. an id selector
  19. you type the URL
  20. 4
  21. 4
  22. <h1>
  23. reacts to a button click
  24. 2
  25. qwerty
  26. when if is false
  27. green
  28. <tr>
  29. 2
  30. True
  31. True
  32. line 1
  33. safe
  34. Art corner
  35. is where we type code
  36. <h1>
  37. close it, tell an adult
  38. a web server
  39. False
  40. <form>

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