← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 148 · 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.🖌️ Where does the text sit on its line?
    h2 {
      background-color: white;
      text-align: left;
      font-size: 20px;
      color: red;
    }
    (a) in the middle (b) on the left (c) on the right
  2. 2.🖌️ What colour are the letters?
    p {
      color: blue;
      text-align: center;
      font-size: 12px;
      background-color: yellow;
    }
    (a) purple (b) blue (c) yellow
  3. 3.🔗 Which words do you click on?
    <a href="art.html">Art corner</a>
    (a) art.html (b) href (c) School news (d) Art corner
  4. 4.📝 How many <input> tags are in this form?
    <form>
      <input type="date">
      <input type="email">
      <input type="number">
      <input type="checkbox">
      <input type="text">
      <input type="submit" value="Send">
    </form>
  5. 5.🏷️ Which is the closing tag for <b>? (a) <b/> (b) </b> (c) <b> (d) <\b>
  6. 6.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  7. 7.Which of these is true of a code editor? (a) turns HTML into a page (b) shows pages from the web (c) is where we type code (d) has an address bar
  8. 8.Which of these is true of <main>? (a) holds a news story (b) sits at the bottom (c) holds the logo and title (d) is the page’s key part
  9. 9.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Banana</li>
    </ul>
  10. 10.🌗 Is yellow on white easy or hard to read? (a) hard to read (b) easy to read
  11. 11.🔗 Which words do you click on?
    <a href="contact.html">Play games</a>
    (a) contact.html (b) href (c) About us (d) Play games
  12. 12.True or false: li is an element selector. (a) True (b) False
  13. 13.🔍 One closing tag is missing. Which one?
    <b>Fun facts</b>
    <small>Cricket is fun.
    <i>I love mangoes.</i>
    (a) </b> (b) </i> (c) </small> (d) </em>
  14. 14.🎯 Which element does the selector .red style? (a) <h1 id="red"> (b) <h1 class="red"> (c) <h1 class="box"> (d) <h2 class="star">
  15. 15.🚀 Which file should this code go in: <h1>My Site</h1> (a) style.css (b) index.html (c) script.js
  16. 16.True or false: HTML on its own can pick a random number. (a) False (b) True
  17. 17.True or false: <footer> holds the menu of links. (a) False (b) True
  18. 18.🛡️ Online: is it safe to download from pop-ups? (a) safe (b) not safe
  19. 19.True or false: the server stores the site’s files. (a) False (b) True
  20. 20.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) body (b) Thanks for visiting. (c) Welcome! (d) My Hobbies
  21. 21.🔐 Is Mango#Kite29! a strong or a weak password? (a) weak (b) strong
  22. 22.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <li> (c) <ol>
  23. 23.🎯 What kind of selector is p? (a) an id selector (b) an element selector (c) a class selector
  24. 24.What is <input type="text"> for? (a) sends the form (b) hides what you type (c) is for one line of words (d) picks a day
  25. 25.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 200px;
      justify-content: flex-start;
    }
    Inside are 3 boxes, each 50px wide (no margins).
  26. 26.⚡ What does this code print? (Look at the quotes!)
    let x = "1";
    let y = 2;
    console.log(x + y);
    (a) Error (b) 3 (c) 12
  27. 27.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) height (c) width (d) src
  28. 28.🖌️ What colour are the letters?
    li {
      background-color: purple;
      font-size: 16px;
      text-align: right;
      color: green;
    }
    (a) white (b) purple (c) green
  29. 29.🔒 Is the connection to this address scrambled (encrypted)?
    https://www.example.net/maths/tables.html
    (a) Yes (b) No
  30. 30.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  31. 31.🌍 What is the path in this URL?
    https://learn.example.com/games/chess.html
    (a) learn.example.com (b) https (c) /games/chess.html (d) /about.html
  32. 32.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h3>I love mangoes.</h3>
    <h2>My best friend</h2>
    <p>Cricket is fun.</p>
  33. 33.🛡️ Before typing a password on a site, check the address starts with ___. (a) www (b) https (c) http (d) ftp
  34. 34.📱 The screen is 1100px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 10px;
      }
    }
    (a) Yes (b) No
  35. 35.🔢 In a basic web page file, which comes LAST? (a) <html> (b) </html> (c) <!DOCTYPE html> (d) <body>
  36. 36.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 10 (d) 3
  37. 37.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Litchi</li>
    </ol>
  38. 38.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  39. 39.True or false: a web browser sends pages over the net. (a) True (b) False
  40. 40.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*

Answer key

  1. on the left
  2. blue
  3. Art corner
  4. 6
  5. </b>
  6. a closing tag
  7. is where we type code
  8. is the page’s key part
  9. 6
  10. hard to read
  11. Play games
  12. True
  13. </small>
  14. <h1 class="red">
  15. index.html
  16. False
  17. False
  18. not safe
  19. True
  20. Welcome!
  21. strong
  22. <ol>
  23. an element selector
  24. is for one line of words
  25. 50
  26. 12
  27. width
  28. green
  29. Yes
  30. a closing tag
  31. /games/chess.html
  32. 3
  33. https
  34. No
  35. </html>
  36. 1
  37. 4
  38. in the head
  39. False
  40. <!--

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