← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 70 · 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 heading shows the BIGGEST text: <h5>, <h4>, <h6> or <h2>? (a) <h2> (b) <h6> (c) <h5> (d) <h4>
  2. 2.🔐 Is 111111 a strong or a weak password? (a) weak (b) strong
  3. 3.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <\h1> (c) <h1> (d) <h1/>
  4. 4.🔗 Which words do you click on?
    <a href="news.html">Play games</a>
    (a) news.html (b) href (c) Play games (d) About us
  5. 5.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  6. 6.Which of these is not safe to do online? (a) type a password on http (b) tell a trusted adult (c) think before you post (d) use a nickname in games
  7. 7.🌐 Which one opens web pages for us? (a) a web server (b) a web browser (c) a code editor
  8. 8.📦 In the box model, which part is space inside the border? (a) border (b) padding (c) content (d) margin
  9. 9.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 10px;
      }
    }
  10. 10.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a src="about.html"> (d) <a alt="about.html">
  11. 11.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h4>? (a) <h1> (b) <h4> (c) <h5> (d) <h2>
  12. 12.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="50">
    (a) map.png (b) dog.jpg (c) Map of India (d) cake.jpg
  13. 13.🌈 Which colour is #ffff00? (a) white (b) bright green (c) yellow (d) black
  14. 14.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 26px;
      }
    }
  15. 15.🔗 Which words do you click on?
    <a href="maths.html">Art corner</a>
    (a) href (b) School news (c) Art corner (d) maths.html
  16. 16.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
  17. 17.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 160px;
      justify-content: center;
    }
    Inside are 2 boxes, each 50px wide (no margins).
  18. 18.🌍 What is the domain name in this URL?
    http://www.example.net/art/gallery.html
    (a) http (b) www.example.net (c) learn.example.com (d) /art/gallery.html
  19. 19.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) index.html (b) Here is my best one. (c) All about me (d) My Hobbies
  20. 20.🎯 Which CSS selector matches this element?
    <div class="note" id="top">Hello</div>
    (a) .big (b) #note (c) .top (d) div
  21. 21.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 19; i = i + 2) {
      console.log(i);
    }
  22. 22.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  23. 23.🔁 What does this code print?
    let marks = 41;
    if (marks < 45) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Try again (b) Pass
  24. 24.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h2> or <h6>? (a) <h6> (b) <h1> (c) <h2> (d) <h3>
  25. 25.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Guava</li>
      <li>Jamun</li>
    </ol>
  26. 26.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) <\h3> (c) <h3> (d) </h3>
  27. 27.✍️ How many declarations (property: value pairs) are in this rule?
    p {
      color: red;
      font-size: 20px;
    }
  28. 28.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
    <p>Our school trip</p>
  29. 29.🔁 How many numbers does this code print?
    for (let i = 0; i < 6; i = i + 2) {
      console.log(i);
    }
  30. 30.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Jamun</td><td>Banana</td><td>Banana</td><td>Mango</td></tr>
    </table>
  31. 31.What does background-color do? (a) makes letters bigger (b) colours behind the text (c) picks the font style (d) makes the text bold
  32. 32.🔗 Where does this link open?
    <a href="about.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  33. 33.🖌️ What colour is behind the letters?
    h1 {
      text-align: left;
      background-color: purple;
      color: red;
      font-size: 36px;
    }
    (a) red (b) purple (c) yellow
  34. 34.🚀 Which file should this code go in: <h1>My Site</h1> (a) style.css (b) index.html (c) script.js
  35. 35.🔢 To build and share your first web page, which comes first: “write the HTML” or “test in a browser”? (a) write the HTML (b) test in a browser
  36. 36.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <ul> (d) <hr>
  37. 37.True or false: <input type="text"> takes only numbers. (a) False (b) True
  38. 38.💪 Which justify-content value puts boxes in the middle? (a) flex-start (b) flex-end (c) center (d) space-between
  39. 39.True or false: <ul> has a closing tag. (a) True (b) False
  40. 40.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 210px;
      padding: 10px;
      border: 1px solid black;
      margin: 5px;
    }

Answer key

  1. <h2>
  2. weak
  3. </h1>
  4. Play games
  5. an opening tag
  6. type a password on http
  7. a web browser
  8. padding
  9. 10
  10. <a href="about.html">
  11. <h1>
  12. map.png
  13. yellow
  14. 26
  15. Art corner
  16. <!--
  17. 30
  18. www.example.net
  19. My Hobbies
  20. div
  21. 18
  22. has a closing tag
  23. Pass
  24. <h6>
  25. 4
  26. </h3>
  27. 2
  28. 3
  29. 3
  30. 4
  31. colours behind the text
  32. in a new tab
  33. purple
  34. index.html
  35. write the HTML
  36. <ul>
  37. False
  38. center
  39. True
  40. 242

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