← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 319 · 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 words do you click on?
    <a href="contact.html">Art corner</a>
    (a) href (b) contact.html (c) School news (d) Art corner
  2. 2.🧩 Which language sets colours and fonts? (a) HTML (b) CSS (c) JavaScript
  3. 3.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  4. 4.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>Fun facts</p> -->
    <p>The red kite</p>
    <p>Hello, world!</p>
    (a) The red kite (b) Rain today (c) Fun facts (d) Hello, world!
  5. 5.True or false: HTML on its own can add pictures to a page. (a) True (b) False
  6. 6.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 5; i++) {
      total = total + i;
    }
    console.log(total);
  7. 7.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  8. 8.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
    <p>Our school trip</p>
    (a) Hello, world! (b) The red kite (c) Our school trip
  9. 9.True or false: a code editor stores a website’s files. (a) True (b) False
  10. 10.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Jamun</td><td>Litchi</td><td>Grapes</td></tr>
      <tr><td>Mango</td><td>Grapes</td><td>Jamun</td></tr>
      <tr><td>Guava</td><td>Guava</td><td>Banana</td></tr>
    </table>
  11. 11.⚖️ Which selector is the weakest? (a) an id selector (b) an element selector (c) a class selector
  12. 12.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) width (c) alt (d) height
  13. 13.⚡ Which JavaScript word repeats code? (a) if (b) alert() (c) for (d) console.log()
  14. 14.Which of these goes in the body? (a) <h1> (b) <title> (c) <meta charset="utf-8"> (d) <style>
  15. 15.🔤 In “HTML”, what does the L stand for? (a) Link (b) Language (c) Line (d) Laptop
  16. 16.🚀 Should file names have spaces, like my page.html? (a) Yes (b) No
  17. 17.⚡ Where does console.log() show its output? (a) on the printer (b) in the console (c) on the title bar (d) in the address bar
  18. 18.🔗 Which address opens when you click this link?
    <a href="quiz.html">About us</a>
    (a) games.html (b) about.html (c) About us (d) quiz.html
  19. 19.True or false: <nav> is the page’s key part. (a) True (b) False
  20. 20.🔗 Where does this link open?
    <a href="quiz.html">Play games</a>
    (a) in a new tab (b) in the same tab
  21. 21.📄 Which part holds everything you see on the page? (a) the head (b) the body (c) the doctype (d) the title
  22. 22.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Mango</td><td>Jamun</td></tr>
    </table>
  23. 23.Which of these is true of a web browser? (a) is where we type code (b) shows line numbers (c) has an address bar (d) saves our .html files
  24. 24.⚡ What number does this code print?
    let runs = 6;
    runs = runs + 3;
    runs = runs - 9;
    console.log(runs);
  25. 25.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="colour"> Blue
      <input type="radio" name="colour"> Orange
      <input type="radio" name="colour"> Green
      <input type="radio" name="colour"> Pink
      <input type="radio" name="colour"> Red
    </form>
  26. 26.♿ Who uses a screen reader? (a) only teachers (b) people who are blind (c) only coders (d) only robots
  27. 27.🌍 Which one asks for a web page? (a) HTTPS (b) the URL (c) the browser (d) the server
  28. 28.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) on the browser tab (d) nowhere
  29. 29.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
  30. 30.True or false: <title> goes in the body. (a) False (b) True
  31. 31.🎯 Which element does the selector #main style? (a) <p id="logo"> (b) <p id="main"> (c) <h1 class="star"> (d) <p class="main">
  32. 32.⚡ Which JavaScript word shows a pop-up box? (a) for (b) if (c) console.log() (d) alert()
  33. 33.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Kites fly high<br>Birds sing<br>Sky is blue</p>
  34. 34.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) A happy dog (b) dog.jpg (c) The full moon (d) width
  35. 35.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 10px;
      }
    }
  36. 36.📊 How many cells does this table have in all?
    <table>
      <tr><td>Mango</td><td>Jamun</td></tr>
      <tr><td>Banana</td><td>Banana</td></tr>
      <tr><td>Jamun</td><td>Guava</td></tr>
      <tr><td>Mango</td><td>Orange</td></tr>
    </table>
  37. 37.⚖️ What colour is the text of this element?
    <h1 class="menu" id="main">Hi</h1>
    CSS:
    h1 { color: white; }
    #main { color: red; }
    (a) purple (b) yellow (c) white (d) red
  38. 38.True or false: a web server has an address bar. (a) False (b) True
  39. 39.🎯 Which element does the selector div style? (a) <span> (b) <div class="red"> (c) <p class="red"> (d) <h1 id="main">
  40. 40.True or false: <ol> lists steps in order. (a) True (b) False

Answer key

  1. Art corner
  2. CSS
  3. No
  4. Fun facts
  5. True
  6. 15
  7. an empty tag
  8. The red kite
  9. False
  10. 3
  11. an element selector
  12. height
  13. for
  14. <h1>
  15. Language
  16. No
  17. in the console
  18. quiz.html
  19. False
  20. in the same tab
  21. the body
  22. 2
  23. has an address bar
  24. 0
  25. 1
  26. people who are blind
  27. the browser
  28. on the browser tab
  29. -->
  30. False
  31. <p id="main">
  32. alert()
  33. 4
  34. A happy dog
  35. 10
  36. 8
  37. red
  38. False
  39. <div class="red">
  40. True

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