← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 543 · 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.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a dot . (d) a slash /
  2. 2.🔒 Is the connection to this address scrambled (encrypted)?
    https://kids.example.org/about.html
    (a) No (b) Yes
  3. 3.✍️ What is the selector in this CSS rule?
    p {
      background-color: yellow;
      width: 300px;
      color: red;
      font-style: italic;
    }
    (a) background-color (b) p (c) 300px (d) .note
  4. 4.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Welcome! (b) Thanks for visiting. (c) Class 7 Blog (d) index.html
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Birds sing</p>
  6. 6.🔁 What does i++ do? (a) prints i (b) takes 1 from i (c) doubles i (d) adds 1 to i
  7. 7.💬 How does an HTML comment start? (a) <!-- (b) /* (c) // (d) #
  8. 8.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 430px;
      justify-content: space-between;
    }
    Inside are 4 boxes, each 100px wide (no margins).
  9. 9.True or false: <title> goes in the body. (a) False (b) True
  10. 10.📝 Which tag gives a form box a name you can click? (a) <h1> (b) <label> (c) <title> (d) <hr>
  11. 11.Which of these is true of a web server? (a) saves our .html files (b) shows line numbers (c) has an address bar (d) stores a website’s files
  12. 12.True or false: in <img>, src names the picture file. (a) True (b) False
  13. 13.🌈 Which colour of light is strongest in rgb(220, 1, 135)? (a) red (b) blue (c) green
  14. 14.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 20px;
      }
    }
  15. 15.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  16. 16.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) close it, tell an adult (b) click it twice (c) share it with friends (d) type the password
  17. 17.🌍 Which one stores the site’s files? (a) the browser (b) the server (c) HTTPS (d) the URL
  18. 18.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Litchi</td><td>Papaya</td><td>Jamun</td><td>Mango</td></tr>
    </table>
  19. 19.🔁 How many times does this code print “Well done”?
    for (let i = 0; i < 2; i++) {
      console.log("Well done");
    }
  20. 20.Which of these goes in the head? (a) <p> (b) <table> (c) <h1> (d) <link rel="stylesheet">
  21. 21.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  22. 22.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>Fun facts</h2>
    <h3>Hello, world!</h3>
  23. 23.🔠 Are headings shown in bold by default? (a) Yes (b) No
  24. 24.📊 In a table, which tag is a row? (a) <th> (b) <tb> (c) <td> (d) <tr>
  25. 25.🔗 Which address opens when you click this link?
    <a href="art.html">School news</a>
    (a) news.html (b) quiz.html (c) art.html (d) School news
  26. 26.Which of these does CSS do? (a) makes a form box (b) makes a link (c) gives the page structure (d) adds space around boxes
  27. 27.📊 How many cells does this table have in all?
    <table>
      <tr><td>Grapes</td><td>Banana</td><td>Orange</td><td>Mango</td></tr>
      <tr><td>Guava</td><td>Jamun</td><td>Guava</td><td>Mango</td></tr>
      <tr><td>Grapes</td><td>Banana</td><td>Jamun</td><td>Litchi</td></tr>
    </table>
  28. 28.🔗 Which words do you click on?
    <a href="https://example.com">Visit the site</a>
    (a) Maths fun (b) Visit the site (c) href (d) https://example.com
  29. 29.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Welcome! (b) Space Facts (c) Thanks for visiting. (d) index.html
  30. 30.🌈 Which hex code is yellow? (a) #ffff00 (b) #000000 (c) #00ff00 (d) #0000ff
  31. 31.🎯 Which CSS selector matches this element?
    <p class="star" id="main">Hello</p>
    (a) p (b) h1 (c) .main (d) #star
  32. 32.🚀 Which tag loads script.js into a page? (a) <js src="script.js"> (b) <link script.js> (c) <script src="script.js"> (d) <a href="script.js">
  33. 33.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 280px;
      padding: 20px;
      border: 3px solid black;
      margin: 0px;
    }
  34. 34.True or false: <input type="number"> lets you tick many. (a) False (b) True
  35. 35.💬 How does an HTML comment end? (a) // (b) */ (c) --> (d) >>
  36. 36.📱 Which tag helps phones show a page at the right size? (a) the hr tag (b) the viewport meta tag (c) the br tag (d) the title tag
  37. 37.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) height (c) width (d) src
  38. 38.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 200px;
      padding: 30px;
      border: 1px solid black;
      margin: 5px;
    }
  39. 39.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
  40. 40.Which of these is true of <footer>? (a) holds the menu of links (b) sits at the bottom (c) holds a news story (d) holds the main content

Answer key

  1. a slash /
  2. Yes
  3. p
  4. Class 7 Blog
  5. 2
  6. adds 1 to i
  7. <!--
  8. 10
  9. False
  10. <label>
  11. stores a website’s files
  12. True
  13. red
  14. 20
  15. an empty tag
  16. close it, tell an adult
  17. the server
  18. 4
  19. 2
  20. <link rel="stylesheet">
  21. <ol>
  22. 3
  23. Yes
  24. <tr>
  25. art.html
  26. adds space around boxes
  27. 12
  28. Visit the site
  29. Space Facts
  30. #ffff00
  31. p
  32. <script src="script.js">
  33. 326
  34. False
  35. -->
  36. the viewport meta tag
  37. width
  38. 272
  39. <a href="about.html">
  40. sits at the bottom

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