← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 866 · 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.True or false: HTTPS shows the page to you. (a) False (b) True
  2. 2.🔢 In a basic web page file, which comes first: “<html>” or “</body>”? (a) </body> (b) <html>
  3. 3.🔗 Which address opens when you click this link?
    <a href="about.html">Take the quiz</a>
    (a) https://example.com (b) Take the quiz (c) contact.html (d) about.html
  4. 4.True or false: <b> has a closing tag. (a) False (b) True
  5. 5.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h4>? (a) <h3> (b) <h1> (c) <h4> (d) <h2>
  6. 6.Which of these is an opening tag? (a) </body> (b) </title> (c) </b> (d) <li>
  7. 7.True or false: <p>Hello!</p> goes in script.js. (a) True (b) False
  8. 8.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  9. 9.Which of these is true of <footer>? (a) sits at the very top (b) sits at the bottom (c) holds the main content (d) helps you move around
  10. 10.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 280px;
      padding: 5px;
      border: 2px solid black;
      margin: 20px;
    }
  11. 11.True or false: HTML adds space around boxes. (a) True (b) False
  12. 12.💪 Which justify-content value packs boxes at the end? (a) center (b) flex-start (c) space-between (d) flex-end
  13. 13.♿ Does this help everyone, or make the page harder to use: add alt text to images? (a) helps everyone (b) makes it harder
  14. 14.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
  15. 15.🌍 What do we call the computer that stores a website? (a) a keyboard (b) a mouse (c) a printer (d) a server
  16. 16.📱 The screen is 700px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 24px;
      }
    }
    (a) Yes (b) No
  17. 17.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 110px;
      padding: 15px;
      border: 5px solid black;
      margin: 20px;
    }
  18. 18.Which of these is a closing tag? (a) </body> (b) <li> (c) <p> (d) <title>
  19. 19.🌈 Which colour is #0000ff? (a) black (b) cyan (c) yellow (d) blue
  20. 20.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
  21. 21.True or false: the border is the line round the box. (a) True (b) False
  22. 22.✍️ Which property is set to bold in this rule?
    p {
      font-weight: bold;
      font-size: 20px;
      margin: 10px;
      padding: 8px;
    }
    (a) font-weight (b) border (c) bold (d) width
  23. 23.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="150">
    (a) fort.jpg (b) tiger.jpg (c) Our school bus (d) bus.jpg
  24. 24.What does justify-content: space-between do? (a) equal gaps, none at ends (b) packs boxes at the end (c) puts boxes in the middle (d) packs boxes at the start
  25. 25.🏷️ Which is the closing tag for <strong>? (a) </strong> (b) <\strong> (c) <strong/> (d) <strong>
  26. 26.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 5; i = i + 2) {
      console.log(i);
    }
  27. 27.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <pic> (d) <a>
  28. 28.🎯 Which element does the selector .menu style? (a) <li class="note"> (b) <div class="big"> (c) <li id="menu"> (d) <li class="menu">
  29. 29.🔁 What does i++ do? (a) adds 1 to i (b) doubles i (c) prints i (d) takes 1 from i
  30. 30.⚡ Where does console.log() show its output? (a) on the printer (b) on the title bar (c) in the console (d) in the address bar
  31. 31.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  32. 32.🌈 Which colour of light is strongest in rgb(245, 34, 34)? (a) green (b) red (c) blue
  33. 33.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  34. 34.🖌️ Where does the text sit on its line?
    p {
      font-size: 16px;
      text-align: right;
      color: orange;
      background-color: white;
    }
    (a) on the right (b) in the middle (c) on the left
  35. 35.🎯 Which element does the selector #end style? (a) <p id="end"> (b) <p class="end"> (c) <p id="hero"> (d) <h1 class="box">
  36. 36.⚡ What does this code show?
    let name = "Aman";
    alert("Welcome, " + name + "!");
    (a) Welcome, Aman! (b) Aman (c) Welcome, name! (d) name
  37. 37.⚖️ What colour is the text of this element?
    <h2 class="menu" id="top">Hi</h2>
    CSS:
    #top { color: purple; }
    #top { color: yellow; }
    (a) white (b) yellow (c) orange (d) purple
  38. 38.🌍 What finds the server for a domain name like example.com? (a) alt (b) CSS (c) DNS (d) HTML
  39. 39.🛡️ Online: is it safe to share your password? (a) not safe (b) safe
  40. 40.Which of these is true of <nav>? (a) is the page’s key part (b) holds one blog post (c) holds copyright notes (d) holds the menu of links

Answer key

  1. False
  2. <html>
  3. about.html
  4. True
  5. <h4>
  6. <li>
  7. False
  8. No
  9. sits at the bottom
  10. 334
  11. False
  12. flex-end
  13. helps everyone
  14. blue
  15. a server
  16. Yes
  17. 190
  18. </body>
  19. blue
  20. red
  21. True
  22. font-weight
  23. bus.jpg
  24. equal gaps, none at ends
  25. </strong>
  26. 4
  27. <img>
  28. <li class="menu">
  29. adds 1 to i
  30. in the console
  31. Yes
  32. red
  33. Yes
  34. on the right
  35. <p id="end">
  36. Welcome, Aman!
  37. yellow
  38. DNS
  39. not safe
  40. holds the menu of links

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