← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 877 · 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 of these is a weak password? (a) Mango#Kite29! (b) 111111 (c) Blue@Tiger_74 (d) Rain#Drop_42!
  2. 2.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 4; i++) {
      total = total + i;
    }
    console.log(total);
  3. 3.🎯 Which CSS selector matches this element?
    <span class="menu" id="hero">Hello</span>
    (a) p (b) #menu (c) .hero (d) .menu
  4. 4.🎯 Which CSS selector matches this element?
    <span class="note" id="end">Hello</span>
    (a) #hero (b) .end (c) span (d) #note
  5. 5.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 8; i++) {
      total = total + 2;
    }
    console.log(total);
  6. 6.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) in a big heading (d) on the browser tab
  7. 7.🖌️ What colour is behind the letters?
    li {
      background-color: red;
      font-size: 28px;
      text-align: left;
      color: purple;
    }
    (a) purple (b) yellow (c) red
  8. 8.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  9. 9.⚡ What does alert() show? (a) a table (b) a new tab (c) a pop-up box (d) a picture
  10. 10.Which colour pair is hard to read? (a) dark grey on white (b) white on black (c) pink on red (d) white on dark blue
  11. 11.⚖️ What colour is the text of this element?
    <p class="box" id="hero">Hi</p>
    CSS:
    p { color: orange; }
    p { color: blue; }
    (a) purple (b) orange (c) red (d) blue
  12. 12.🔢 To build and share your first web page, what comes right after “write the HTML”? (a) publish it online (b) plan what to show (c) test in a browser (d) add CSS styles
  13. 13.Which of these is an opening tag? (a) </li> (b) </h1> (c) </p> (d) <body>
  14. 14.🔗 Where does this link open?
    <a href="games.html">Play games</a>
    (a) in a new tab (b) in the same tab
  15. 15.🔁 What does this code print?
    let temp = 6;
    if (temp < 10) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Hot (b) Cool
  16. 16.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
  17. 17.📱 The screen is 1100px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 24px;
      }
    }
    (a) Yes (b) No
  18. 18.True or false: <ul> goes inside ul or ol. (a) False (b) True
  19. 19.📋 What number does the browser show next to “Banana”?
    <ol start="8">
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Mango</li>
    </ol>
  20. 20.✍️ CSS declarations go inside which brackets? (a) < > (b) [ ] (c) ( ) (d) { }
  21. 21.True or false: the content is the line round the box. (a) True (b) False
  22. 22.True or false: HTTPS scrambles data on its way. (a) True (b) False
  23. 23.🔁 What does i++ do? (a) doubles i (b) takes 1 from i (c) prints i (d) adds 1 to i
  24. 24.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <pic> (d) <p>
  25. 25.🚀 Which file should this code go in: let score = 0; (a) style.css (b) script.js (c) index.html
  26. 26.📝 Which input type sends the form? (a) password (b) radio (c) checkbox (d) submit
  27. 27.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the later one (b) neither (c) the shorter one (d) the first one
  28. 28.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the body (d) the doctype
  29. 29.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="300">
    (a) fort.jpg (b) width (c) A tiger asleep (d) An old fort
  30. 30.📝 Which tag gives a form box a name you can click? (a) <hr> (b) <title> (c) <label> (d) <h1>
  31. 31.🎯 How many elements on a page should have the same id? (a) any number (b) 2 (c) 1 (d) 5
  32. 32.🌐 Which one answers page requests? (a) a code editor (b) a web server (c) a web browser
  33. 33.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  34. 34.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <link about.html>
  35. 35.🔗 Which words do you click on?
    <a href="contact.html">Take the quiz</a>
    (a) href (b) contact.html (c) Take the quiz (d) Play games
  36. 36.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) We won by 5 runs. (b) index.html (c) Space Facts (d) Planets
  37. 37.🔁 How many times does this code print “Well done”?
    for (let i = 2; i < 10; i++) {
      console.log("Well done");
    }
  38. 38.🎯 Which CSS selector matches this element?
    <li class="big" id="top">Hello</li>
    (a) .big (b) div (c) #intro (d) #big
  39. 39.💬 How does an HTML comment end? (a) */ (b) // (c) --> (d) >>
  40. 40.🛡️ Should you share your password with your best friend? (a) Yes (b) No

Answer key

  1. 111111
  2. 10
  3. .menu
  4. span
  5. 16
  6. on the browser tab
  7. red
  8. an opening tag
  9. a pop-up box
  10. pink on red
  11. blue
  12. add CSS styles
  13. <body>
  14. in the same tab
  15. Hot
  16. 1
  17. Yes
  18. False
  19. 11
  20. { }
  21. False
  22. True
  23. adds 1 to i
  24. <img>
  25. script.js
  26. submit
  27. the later one
  28. the body
  29. An old fort
  30. <label>
  31. 1
  32. a web server
  33. an opening tag
  34. <a href="about.html">
  35. Take the quiz
  36. Space Facts
  37. 8
  38. .big
  39. -->
  40. No

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