← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 562 · 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.🛡️ Should you share your password with your best friend? (a) No (b) Yes
  2. 2.📱 max-width: 600px applies when the screen is ___. (a) exactly 1000px (b) 600px or narrower (c) 600px or wider (d) turned off
  3. 3.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <head> (c) </body> (d) </head>
  4. 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 3 (d) 2
  5. 5.✍️ CSS declarations go inside which brackets? (a) { } (b) ( ) (c) < > (d) [ ]
  6. 6.🌍 Which one stores the site’s files? (a) the server (b) the URL (c) the browser (d) HTTPS
  7. 7.True or false: <main> is the page’s key part. (a) False (b) True
  8. 8.True or false: <h1>My Site</h1> goes in style.css. (a) False (b) True
  9. 9.🖌️ What colour are the letters?
    p {
      background-color: black;
      text-align: right;
      font-size: 36px;
      color: white;
    }
    (a) red (b) black (c) white
  10. 10.🌈 In #0a0000 the red part is the hex number 0a. What is it as a normal number?
  11. 11.⚖️ What colour is the text of this element?
    <p class="red" id="top">Hi</p>
    CSS:
    .red { color: blue; }
    .red { color: green; }
    (a) green (b) purple (c) blue (d) black
  12. 12.🎯 Which CSS selector matches this element?
    <p class="menu" id="top">Hello</p>
    (a) .top (b) h1 (c) p (d) .note
  13. 13.What is <input type="checkbox"> for? (a) takes only numbers (b) lets you pick only one (c) lets you tick many (d) sends the form
  14. 14.True or false: to share your OTP is safe. (a) False (b) True
  15. 15.🌈 Which colour is #00ffff? (a) bright green (b) magenta (c) blue (d) cyan
  16. 16.🔢 To build and share your first web page, which comes first: “test in a browser” or “publish it online”? (a) test in a browser (b) publish it online
  17. 17.💬 How does an HTML comment start? (a) /* (b) // (c) # (d) <!--
  18. 18.True or false: <table> holds the whole table. (a) False (b) True
  19. 19.True or false: the content is the line round the box. (a) False (b) True
  20. 20.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <img> (d) <p>
  21. 21.♿ Does this help everyone, or make the page harder to use: link text “click here”? (a) makes it harder (b) helps everyone
  22. 22.🌍 What do we call the computer that stores a website? (a) a keyboard (b) a server (c) a printer (d) a mouse
  23. 23.🌈 Which colour of light is strongest in rgb(191, 53, 54)? (a) green (b) blue (c) red
  24. 24.🔢 When you open a web page, which comes first: “the browser shows it” or “the server sends files”? (a) the browser shows it (b) the server sends files
  25. 25.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 270px;
      padding: 5px;
      border: 5px solid black;
      margin: 5px;
    }
  26. 26.🎯 Can many elements share the same class? (a) No (b) Yes
  27. 27.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <link about.html>
  28. 28.⚡ What does this code print? (Look at the quotes!)
    let x = "3";
    let y = 5;
    console.log(x + y);
    (a) 8 (b) 35 (c) Error
  29. 29.🖌️ Where does the text sit on its line?
    h1 {
      color: blue;
      background-color: green;
      text-align: left;
      font-size: 24px;
    }
    (a) in the middle (b) on the left (c) on the right
  30. 30.🎨 Which tag holds CSS inside the head? (a) <script> (b) <css> (c) <body> (d) <style>
  31. 31.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  32. 32.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  33. 33.True or false: HTML on its own cannot pick a random number. (a) False (b) True
  34. 34.🔁 Which loop repeats code a set number of times? (a) let (b) else (c) for (d) if
  35. 35.🔢 To build and share your first web page, which comes FIRST? (a) test in a browser (b) write the HTML (c) add CSS styles (d) plan what to show
  36. 36.True or false: CSS changes the text size. (a) False (b) True
  37. 37.🎯 Which CSS selector matches this element?
    <li class="box" id="logo">Hello</li>
    (a) div (b) .star (c) .logo (d) .box
  38. 38.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <a> (c) <img> (d) <ul>
  39. 39.Which of these is an empty tag? (a) <h1> (b) <ul> (c) <p> (d) <input>
  40. 40.True or false: to click prize links is not safe. (a) False (b) True

Answer key

  1. No
  2. 600px or narrower
  3. </html>
  4. 3
  5. { }
  6. the server
  7. True
  8. False
  9. white
  10. 10
  11. green
  12. p
  13. lets you tick many
  14. False
  15. cyan
  16. test in a browser
  17. <!--
  18. True
  19. False
  20. <a>
  21. makes it harder
  22. a server
  23. red
  24. the server sends files
  25. 300
  26. Yes
  27. <a href="about.html">
  28. 35
  29. on the left
  30. <style>
  31. in the body
  32. a closing tag
  33. True
  34. for
  35. plan what to show
  36. True
  37. .box
  38. <meta charset="utf-8">
  39. <input>
  40. True

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