← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 804 · 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 times does this code print “Hi”?
    for (let i = 0; i <= 9; i++) {
      console.log("Hi");
    }
  2. 2.🌈 Which colour of light is strongest in rgb(194, 101, 92)? (a) blue (b) red (c) green
  3. 3.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Rain today</p>
    <!-- <p>I love mangoes.</p> -->
    (a) I love mangoes. (b) Rain today (c) My pets
  4. 4.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 260px;
      padding: 15px;
      border: 1px solid black;
      margin: 15px;
    }
  5. 5.True or false: alert("Hi"); goes in index.html. (a) True (b) False
  6. 6.⚖️ What colour is the text of this element?
    <p class="red" id="hero">Hi</p>
    CSS:
    .red { color: green; }
    #hero { color: black; }
    p { color: white; }
    (a) white (b) purple (c) black (d) green
  7. 7.True or false: the server scrambles data on its way. (a) True (b) False
  8. 8.🔍 Which is the odd one out? (a) saves our .html files (b) colours code to help us (c) shows line numbers (d) stores a website’s files
  9. 9.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h6> or <h2>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
  10. 10.🌍 Which one shows the page to you? (a) the server (b) the URL (c) HTTPS (d) the browser
  11. 11.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) type the password (b) close it, tell an adult (c) click it twice (d) share it with friends
  12. 12.📝 What does a password box show instead of letters? (a) emojis (b) dots (c) capital letters (d) numbers
  13. 13.📱 The screen is 700px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 14px;
      }
    }
    (a) Yes (b) No
  14. 14.True or false: <td> holds the whole table. (a) False (b) True
  15. 15.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
  16. 16.🔗 Which words do you click on?
    <a href="quiz.html">Art corner</a>
    (a) href (b) School news (c) Art corner (d) quiz.html
  17. 17.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Jamun</li>
    </ul>
    (a) numbers (b) bullets
  18. 18.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
  19. 19.🔠 Are headings shown in bold by default? (a) No (b) Yes
  20. 20.✍️ What is the selector in this CSS rule?
    p {
      margin: 10px;
      font-size: 20px;
      font-weight: bold;
    }
    (a) .note (b) 20px (c) p (d) margin
  21. 21.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="fruit"> Banana
      <input type="checkbox" name="fruit"> Litchi
      <input type="checkbox" name="fruit"> Papaya
      <input type="checkbox" name="fruit"> Guava
      <input type="checkbox" name="fruit"> Mango
    </form>
  22. 22.🔗 Which words do you click on?
    <a href="quiz.html">Play games</a>
    (a) About us (b) quiz.html (c) href (d) Play games
  23. 23.True or false: a web browser is where we type code. (a) False (b) True
  24. 24.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>Good morning!</h2>
    <p>Fun facts</p>
    <p>Rain today</p>
    <h2>My pets</h2>
  25. 25.🧭 Who is helped most by semantic tags? (a) only the printer (b) only the server (c) screen-reader users (d) nobody
  26. 26.True or false: margin is space inside the border. (a) True (b) False
  27. 27.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  28. 28.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
  29. 29.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <li> (d) <p>
  30. 30.🌈 In #007d00 the green part is the hex number 7d. What is it as a normal number?
  31. 31.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a href="about.html"> (d) <a alt="about.html">
  32. 32.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Kites fly high<br>Birds sing<br>Sky is blue<br>Roses are red</p>
  33. 33.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>My pets</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Cricket is fun.</p>
    (a) I love mangoes. (b) Cricket is fun. (c) My pets (d) Rain today
  34. 34.✍️ What value is given to background-color in this rule?
    p {
      width: 300px;
      background-color: yellow;
    }
    (a) 10px (b) background-color (c) 8px (d) yellow
  35. 35.🎯 Which CSS selector matches this element?
    <h1 class="big" id="main">Hello</h1>
    (a) .main (b) .red (c) .big (d) #big
  36. 36.Which of these has a closing tag? (a) <br> (b) <hr> (c) <ul> (d) <input>
  37. 37.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) id (d) src
  38. 38.🔐 Is Blue@Tiger_74 a strong or a weak password? (a) strong (b) weak
  39. 39.🔗 Which words do you click on?
    <a href="games.html">About us</a>
    (a) games.html (b) href (c) Contact us (d) About us
  40. 40.🚀 Which file should this code go in: alert(score); (a) style.css (b) script.js (c) index.html

Answer key

  1. 10
  2. red
  3. I love mangoes.
  4. 322
  5. False
  6. black
  7. False
  8. stores a website’s files
  9. <h1>
  10. the browser
  11. close it, tell an adult
  12. dots
  13. Yes
  14. False
  15. False
  16. Art corner
  17. bullets
  18. 6
  19. Yes
  20. p
  21. 5
  22. Play games
  23. False
  24. 3
  25. screen-reader users
  26. False
  27. in the body
  28. a web browser
  29. <li>
  30. 125
  31. <a href="about.html">
  32. 5
  33. I love mangoes.
  34. yellow
  35. .big
  36. <ul>
  37. href
  38. strong
  39. About us
  40. script.js

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