← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 74 · 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 slash / (d) a dot .
  2. 2.🔍 Which is the odd one out? (a) checks a quiz answer (b) makes headings and lists (c) counts down a timer (d) shows a pop-up message
  3. 3.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) at the bottom (d) in a big heading
  4. 4.✍️ Which sign ends each CSS declaration? (a) ; (b) . (c) , (d) :
  5. 5.Which of these has a closing tag? (a) <hr> (b) <b> (c) <img> (d) <meta>
  6. 6.🔗 Which address opens when you click this link?
    <a href="contact.html">About us</a>
    (a) About us (b) contact.html (c) https://example.com (d) maths.html
  7. 7.🔤 In “HTML”, what does the L stand for? (a) Line (b) Language (c) Laptop (d) Link
  8. 8.💬 How does an HTML comment start? (a) # (b) /* (c) <!-- (d) //
  9. 9.Which of these is margin? (a) the gap round content (b) space outside the border (c) space inside the border (d) the text or picture
  10. 10.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  11. 11.✍️ Which sign goes between a property and its value? (a) - (b) ; (c) = (d) :
  12. 12.🧭 Why use <nav> instead of <div> for a menu? (a) it makes text red (b) it adds pictures (c) it tells its meaning (d) it loads faster
  13. 13.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <img> (d) <pic>
  14. 14.⚡ Where does console.log() show its output? (a) in the address bar (b) on the printer (c) in the console (d) on the title bar
  15. 15.🔐 Is Kite_Fl1es@Dawn a strong or a weak password? (a) strong (b) weak
  16. 16.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h2>My best friend</h2>
    <p>Our school trip</p>
    <p>Fun facts</p>
  17. 17.Which of these is not safe to do online? (a) use a strong password (b) keep passwords secret (c) use a nickname in games (d) share your OTP
  18. 18.⚖️ What colour is the text of this element?
    <h1 class="big" id="end">Hi</h1>
    CSS:
    .big { color: black; }
    #end { color: orange; }
    h1 { color: green; }
    (a) orange (b) blue (c) black (d) green
  19. 19.🌈 Which hex code is blue? (a) #000000 (b) #0000ff (c) #ff0000 (d) #00ff00
  20. 20.📱 Responsive design means a page ___. (a) is only for laptops (b) has no pictures (c) never changes (d) fits every screen
  21. 21.True or false: <input type="date"> lets you pick only one. (a) False (b) True
  22. 22.True or false: to type a password on http is not safe. (a) False (b) True
  23. 23.True or false: <ul><li>Art</li></ul> goes in script.js. (a) False (b) True
  24. 24.True or false: <table> holds the whole table. (a) False (b) True
  25. 25.🔁 What does this code print?
    let temp = 29;
    if (temp < 11) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Hot (b) Cool
  26. 26.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 280px;
      justify-content: center;
    }
    Inside are 2 boxes, each 80px wide (no margins).
  27. 27.🔁 What does this code print?
    let age = 19;
    if (age < 34) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  28. 28.✍️ What value is given to text-align in this rule?
    #top {
      text-align: center;
      font-weight: bold;
    }
    (a) center (b) yellow (c) 10px (d) text-align
  29. 29.Which of these is margin? (a) space inside the border (b) the line round the box (c) the text or picture (d) the gap to other boxes
  30. 30.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Grapes</td><td>Papaya</td></tr>
      <tr><td>Papaya</td><td>Guava</td></tr>
    </table>
  31. 31.True or false: <h1>My Site</h1> goes in style.css. (a) False (b) True
  32. 32.🖌️ What colour is behind the letters?
    p {
      color: red;
      background-color: blue;
      text-align: left;
      font-size: 40px;
    }
    (a) red (b) blue (c) green
  33. 33.🧭 Which semantic tag sits at the bottom? (a) <footer> (b) <header> (c) <main> (d) <aside>
  34. 34.📊 In a table, which tag is a row? (a) <td> (b) <tr> (c) <th> (d) <tb>
  35. 35.True or false: <ul> lists steps in order. (a) True (b) False
  36. 36.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Fun facts</p>
    <p>The red kite</p>
    (a) The red kite (b) My best friend (c) Fun facts
  37. 37.True or false: to post your home address is safe. (a) True (b) False
  38. 38.What does font-size do? (a) makes letters bigger (b) colours behind the text (c) sets the letter colour (d) picks the font style
  39. 39.True or false: the URL stores the site’s files. (a) True (b) False
  40. 40.🚀 Which file should this code go in: score = score + 1; (a) index.html (b) style.css (c) script.js

Answer key

  1. a slash /
  2. makes headings and lists
  3. on the browser tab
  4. ;
  5. <b>
  6. contact.html
  7. Language
  8. <!--
  9. space outside the border
  10. a closing tag
  11. :
  12. it tells its meaning
  13. <img>
  14. in the console
  15. strong
  16. 2
  17. share your OTP
  18. orange
  19. #0000ff
  20. fits every screen
  21. False
  22. True
  23. False
  24. True
  25. Cool
  26. 60
  27. teen
  28. center
  29. the gap to other boxes
  30. 6
  31. False
  32. blue
  33. <footer>
  34. <tr>
  35. False
  36. My best friend
  37. False
  38. makes letters bigger
  39. False
  40. script.js

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