← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 328 · 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 CSS selector matches this element?
    <h1 class="note" id="end">Hello</h1>
    (a) #end (b) .end (c) h2 (d) #note
  2. 2.True or false: <tr> holds the whole table. (a) False (b) True
  3. 3.Which colour pair is hard to read? (a) yellow on black (b) black on white (c) blue on purple (d) white on dark blue
  4. 4.🚀 Which file should this code go in: h1 { font-size: 32px; } (a) script.js (b) index.html (c) style.css
  5. 5.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Litchi</td><td>Banana</td></tr>
    </table>
  6. 6.♿ A part of the page is under a <h5> heading. Which tag should its sub-heading use? (a) <h5> (b) <h6> (c) <h3> (d) <h1>
  7. 7.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 5; i++) {
      total = total + i;
    }
    console.log(total);
  8. 8.🌍 What is the path in this URL?
    https://www.example.com/maths/tables.html
    (a) /maths/tables.html (b) www.example.com (c) /index.html (d) https
  9. 9.🌍 Which one stores the site’s files? (a) the browser (b) the URL (c) HTTPS (d) the server
  10. 10.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
  11. 11.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) body (b) Space Facts (c) Try this poha. (d) Welcome!
  12. 12.🚀 Which file should this code go in: alert(score); (a) style.css (b) index.html (c) script.js
  13. 13.Which of these is an opening tag? (a) </title> (b) <h1> (c) </h1> (d) </li>
  14. 14.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>My best friend</h4>
    <p>Good morning!</p>
    <h3>Good morning!</h3>
    <p>My pets</p>
  15. 15.🧩 Which language checks a quiz answer? (a) CSS (b) HTML (c) JavaScript
  16. 16.True or false: <table> holds the whole table. (a) False (b) True
  17. 17.🌈 Which hex code is blue? (a) #ffffff (b) #0000ff (c) #ff00ff (d) #00ff00
  18. 18.Which of these goes in the head? (a) <h1> (b) <a> (c) <link rel="stylesheet"> (d) <ul>
  19. 19.🔐 Is qwerty a strong or a weak password? (a) strong (b) weak
  20. 20.📊 Which tag gives the table a title? (a) <table> (b) <tr> (c) <th> (d) <caption>
  21. 21.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>The red kite</p>
    <p>Fun facts</p>
    <h2>Our school trip</h2>
    <p>Rain today</p>
  22. 22.🚀 You change your code. What should you do to see the change? (a) rename the folder (b) delete the file (c) switch off the PC (d) save and refresh
  23. 23.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  24. 24.🔍 Which is the odd one out? (a) stores a website’s files (b) answers page requests (c) hosts websites online (d) saves our .html files
  25. 25.True or false: a code editor sends pages over the net. (a) False (b) True
  26. 26.🛡️ Should you share your password with your best friend? (a) Yes (b) No
  27. 27.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Mango</td><td>Grapes</td><td>Banana</td></tr>
    </table>
  28. 28.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h4> or <h5>? (a) <h3> (b) <h4> (c) <h6> (d) <h5>
  29. 29.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 22px;
      }
    }
  30. 30.🔢 To build and share your first web page, which comes first: “publish it online” or “add CSS styles”? (a) add CSS styles (b) publish it online
  31. 31.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Banana</li>
    </ol>
  32. 32.📊 How many rows does this table have?
    <table>
      <tr><td>Jamun</td><td>Orange</td><td>Mango</td></tr>
      <tr><td>Guava</td><td>Grapes</td><td>Papaya</td></tr>
      <tr><td>Papaya</td><td>Mango</td><td>Guava</td></tr>
    </table>
  33. 33.🔗 Where does this link open?
    <a href="art.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  34. 34.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
    (a) Cricket is fun. (b) Rain today (c) The red kite
  35. 35.🎯 Which CSS selector matches this element?
    <span class="big" id="intro">Hello</span>
    (a) #main (b) p (c) .red (d) .big
  36. 36.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="150">
  37. 37.🖌️ Which CSS property centres a heading? (a) color (b) background-color (c) text-align (d) font-family
  38. 38.🔠 Are headings shown in bold by default? (a) Yes (b) No
  39. 39.Which of these does HTML do? (a) shows a pop-up message (b) reacts to a button click (c) checks a quiz answer (d) makes a link
  40. 40.💬 How does an HTML comment start? (a) # (b) /* (c) // (d) <!--

Answer key

  1. #end
  2. False
  3. blue on purple
  4. style.css
  5. 2
  6. <h6>
  7. 15
  8. /maths/tables.html
  9. the server
  10. 4
  11. Welcome!
  12. script.js
  13. <h1>
  14. 3
  15. JavaScript
  16. True
  17. #0000ff
  18. <link rel="stylesheet">
  19. weak
  20. <caption>
  21. 2
  22. save and refresh
  23. has a closing tag
  24. saves our .html files
  25. False
  26. No
  27. 3
  28. <h6>
  29. 22
  30. add CSS styles
  31. 4
  32. 3
  33. in a new tab
  34. The red kite
  35. .big
  36. 150
  37. text-align
  38. Yes
  39. makes a link
  40. <!--

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