← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 843 · 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 cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Jamun</td><td>Orange</td><td>Jamun</td></tr>
      <tr><td>Jamun</td><td>Grapes</td><td>Papaya</td></tr>
    </table>
  2. 2.🔢 To build and share your first web page, which comes FIRST? (a) plan what to show (b) write the HTML (c) test in a browser (d) add CSS styles
  3. 3.🔢 On a typical page, from top to bottom, which comes first: “<main>” or “<header>”? (a) <header> (b) <main>
  4. 4.🖼️ Which attribute of <img> tells which image to load? (a) height (b) alt (c) width (d) src
  5. 5.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) has an address bar (d) shows line numbers
  6. 6.True or false: HTML makes a form box. (a) True (b) False
  7. 7.Which of these is a strong password? (a) abcd1234 (b) iloveyou (c) password (d) Kite_Fl1es@Dawn
  8. 8.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 250px;
      padding: 10px;
      border: 1px solid black;
      margin: 20px;
    }
  9. 9.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ul> (d) <ol>
  10. 10.🔁 What does this code print?
    let age = 39;
    if (age >= 41) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  11. 11.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) src (d) id
  12. 12.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
    (a) My pets (b) Cricket is fun. (c) Good morning!
  13. 13.⚖️ What colour is the text of this element?
    <p class="red" id="intro">Hi</p>
    CSS:
    p { color: orange; }
    #intro { color: red; }
    (a) purple (b) blue (c) orange (d) red
  14. 14.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <p> (d) <link>
  15. 15.Which of these has a closing tag? (a) <br> (b) <img> (c) <input> (d) <b>
  16. 16.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Space Facts (b) Thanks for visiting. (c) Match report (d) index.html
  17. 17.⚖️ What colour is the text of this element?
    <p class="big" id="logo">Hi</p>
    CSS:
    #logo { color: blue; }
    p { color: yellow; }
    .big { color: green; }
    (a) green (b) yellow (c) blue (d) white
  18. 18.⚡ Which JavaScript word shows a pop-up box? (a) if (b) alert() (c) console.log() (d) let
  19. 19.📱 The screen is 1366px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 10px;
      }
    }
    (a) Yes (b) No
  20. 20.⚖️ Which selector is the strongest? (a) a class selector (b) an element selector (c) an id selector
  21. 21.True or false: the border is space outside the border. (a) True (b) False
  22. 22.📝 What do we need to write HTML? (a) a microphone (b) a plain text editor (c) a paintbrush (d) a printer
  23. 23.🔢 In a basic web page file, which comes first: “</html>” or “<body>”? (a) <body> (b) </html>
  24. 24.🔍 One closing tag is missing. Which one?
    <h1>My pets</h1>
    <h2>Hello, world!</h2>
    <p>I love mangoes.
    (a) </h1> (b) </h2> (c) </p> (d) </i>
  25. 25.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 4 (d) 6
  26. 26.🌐 Which one hosts websites online? (a) a web server (b) a web browser (c) a code editor
  27. 27.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 170px;
      justify-content: flex-start;
    }
    Inside are 3 boxes, each 50px wide (no margins).
  28. 28.⚖️ What colour is the text of this element?
    <h2 class="star" id="intro">Hi</h2>
    CSS:
    #intro { color: purple; }
    #intro { color: white; }
    (a) white (b) yellow (c) red (d) purple
  29. 29.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Orange</li>
    </ul>
    (a) numbers (b) bullets
  30. 30.Which of these has a closing tag? (a) <input> (b) <br> (c) <p> (d) <hr>
  31. 31.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to leave notes (d) to make links
  32. 32.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 8; i++) {
      total = total + i;
    }
    console.log(total);
  33. 33.True or false: <hr> is an empty tag. (a) True (b) False
  34. 34.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <p> (d) <h1>
  35. 35.What is <input type="number"> for? (a) lets you pick only one (b) is for an email address (c) takes only numbers (d) hides what you type
  36. 36.📱 The screen is 320px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 10px;
      }
    }
    (a) Yes (b) No
  37. 37.True or false: in <img>, alt sets how wide it is. (a) True (b) False
  38. 38.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  39. 39.🔗 Which address opens when you click this link?
    <a href="games.html">Take the quiz</a>
    (a) games.html (b) Take the quiz (c) contact.html (d) about.html
  40. 40.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Guava</li>
    </ol>

Answer key

  1. 3
  2. plan what to show
  3. <header>
  4. src
  5. shows line numbers
  6. True
  7. Kite_Fl1es@Dawn
  8. 312
  9. <ol>
  10. child
  11. href
  12. My pets
  13. red
  14. <a>
  15. <b>
  16. Space Facts
  17. blue
  18. alert()
  19. No
  20. an id selector
  21. False
  22. a plain text editor
  23. <body>
  24. </p>
  25. 6
  26. a web server
  27. 20
  28. white
  29. bullets
  30. <p>
  31. to leave notes
  32. 36
  33. True
  34. <h6>
  35. takes only numbers
  36. Yes
  37. False
  38. in the head
  39. games.html
  40. 3

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