← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 258 · 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 one sends the page back? (a) HTTPS (b) the browser (c) the URL (d) the server
  2. 2.True or false: HTML rounds box corners. (a) True (b) False
  3. 3.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Guava</li>
      <li>Litchi</li>
    </ol>
  4. 4.🔢 In a basic web page file, which comes first: “</head>” or “<body>”? (a) </head> (b) <body>
  5. 5.🔁 Which loop repeats code a set number of times? (a) for (b) let (c) else (d) if
  6. 6.🛡️ Online: is it safe to share your OTP? (a) not safe (b) safe
  7. 7.✍️ What is the selector in this CSS rule?
    li {
      color: red;
      text-align: center;
      background-color: yellow;
    }
    (a) color (b) li (c) body (d) center
  8. 8.🏷️ HTML marks up text using ___. (a) pixels (b) tags (c) keys (d) wires
  9. 9.🎯 Which element does the selector #main style? (a) <p class="red"> (b) <span id="logo"> (c) <span id="main"> (d) <span class="main">
  10. 10.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h1> or <h2>? (a) <h4> (b) <h6> (c) <h2> (d) <h1>
  11. 11.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="150">
    (a) Map of India (b) A red kite (c) width (d) kite.png
  12. 12.⚖️ What colour is the text of this element?
    <h1 class="red" id="hero">Hi</h1>
    CSS:
    .red { color: green; }
    h1 { color: red; }
    (a) white (b) red (c) green (d) black
  13. 13.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  14. 14.🖌️ What colour is behind the letters?
    h1 {
      font-size: 12px;
      color: white;
      text-align: left;
      background-color: blue;
    }
    (a) blue (b) orange (c) white
  15. 15.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
  16. 16.🌈 In #320000 the red part is the hex number 32. What is it as a normal number?
  17. 17.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <head> (c) <html> (d) <body>
  18. 18.📱 The screen is 820px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 12px;
      }
    }
    (a) No (b) Yes
  19. 19.🌈 In #000c00 the green part is the hex number 0c. What is it as a normal number?
  20. 20.🌈 In #0000e5 the blue part is the hex number e5. What is it as a normal number?
  21. 21.True or false: in <img>, alt sets how wide it is. (a) False (b) True
  22. 22.📝 Which tag holds a whole form? (a) <input> (b) <table> (c) <form> (d) <ol>
  23. 23.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="200">
    (a) fort.jpg (b) kite.png (c) An old fort (d) tiger.jpg
  24. 24.🧩 Which language puts a picture on a page? (a) CSS (b) HTML (c) JavaScript
  25. 25.⚖️ What colour is the text of this element?
    <h2 class="box" id="intro">Hi</h2>
    CSS:
    .box { color: purple; }
    .box { color: yellow; }
    (a) purple (b) black (c) yellow (d) white
  26. 26.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h3> or <h2>? (a) <h4> (b) <h3> (c) <h6> (d) <h2>
  27. 27.📋 What number does the browser show next to “Mango”?
    <ol start="4">
      <li>Litchi</li>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  28. 28.True or false: in <img>, src tells which image to load. (a) True (b) False
  29. 29.🛡️ Before typing a password on a site, check the address starts with ___. (a) https (b) http (c) ftp (d) www
  30. 30.⚡ Which JavaScript word shows a pop-up box? (a) let (b) console.log() (c) if (d) alert()
  31. 31.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 90px;
      padding: 20px;
      border: 5px solid black;
      margin: 15px;
    }
  32. 32.🚀 Which file should this code go in: <a href="a.html">Go</a> (a) index.html (b) script.js (c) style.css
  33. 33.True or false: the URL is the page’s address. (a) True (b) False
  34. 34.🌍 What is the path in this URL?
    https://school.example.in/index.html
    (a) school.example.in (b) /art/gallery.html (c) https (d) /index.html
  35. 35.📊 Which tag gives the table a title? (a) <tr> (b) <table> (c) <caption> (d) <td>
  36. 36.Which of these goes in the head? (a) <a> (b) <link rel="stylesheet"> (c) <ul> (d) <table>
  37. 37.♿ A part of the page is under a <h3> heading. Which tag should its sub-heading use? (a) <h6> (b) <h2> (c) <h3> (d) <h4>
  38. 38.True or false: HTML changes the page live. (a) True (b) False
  39. 39.🔗 Where does this link open?
    <a href="https://example.com">School news</a>
    (a) in a new tab (b) in the same tab
  40. 40.🖌️ Which CSS property colours behind the text? (a) font-size (b) background-color (c) font-family (d) color

Answer key

  1. the server
  2. False
  3. 4
  4. </head>
  5. for
  6. not safe
  7. li
  8. tags
  9. <span id="main">
  10. <h1>
  11. A red kite
  12. green
  13. an empty tag
  14. blue
  15. href
  16. 50
  17. <!DOCTYPE html>
  18. Yes
  19. 12
  20. 229
  21. False
  22. <form>
  23. fort.jpg
  24. HTML
  25. yellow
  26. <h2>
  27. 5
  28. True
  29. https
  30. alert()
  31. 170
  32. index.html
  33. True
  34. /index.html
  35. <caption>
  36. <link rel="stylesheet">
  37. <h4>
  38. False
  39. in the same tab
  40. background-color

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