← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 442 · 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 of these is true of a web server? (a) opens web pages for us (b) stores a website’s files (c) is where we type code (d) shows line numbers
  2. 2.💪 Which justify-content value equal gaps, none at ends? (a) center (b) flex-start (c) space-between (d) flex-end
  3. 3.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 240px;
      justify-content: center;
    }
    Inside are 4 boxes, each 50px wide (no margins).
  4. 4.📊 Which tag gives the table a title? (a) <caption> (b) <th> (c) <td> (d) <table>
  5. 5.✍️ Which sign ends each CSS declaration? (a) : (b) , (c) ; (d) .
  6. 6.Which of these is a closing tag? (a) <body> (b) </b> (c) <b> (d) <li>
  7. 7.🚀 Which file should this code go in: body { margin: 0; } (a) index.html (b) style.css (c) script.js
  8. 8.♿ A part of the page is under a <h5> heading. Which tag should its sub-heading use? (a) <h5> (b) <h1> (c) <h2> (d) <h6>
  9. 9.⚖️ Which selector is the weakest? (a) an id selector (b) a class selector (c) an element selector
  10. 10.⚖️ What colour is the text of this element?
    <h1 class="red" id="hero">Hi</h1>
    CSS:
    h1 { color: orange; }
    h1 { color: yellow; }
    (a) purple (b) blue (c) yellow (d) orange
  11. 11.True or false: h1 is a class selector. (a) True (b) False
  12. 12.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  13. 13.♿ Is this heading order correct (no level skipped)?
    <h1> → <h2> → <h3> → <h4>
    (a) Yes (b) No
  14. 14.🔠 Which tag is the least important heading? (a) <h1> (b) <h6> (c) <h3> (d) <p>
  15. 15.True or false: <input type="checkbox"> lets you tick many. (a) True (b) False
  16. 16.✍️ What value is given to font-style in this rule?
    body {
      color: red;
      font-style: italic;
    }
    (a) italic (b) red (c) 20px (d) font-style
  17. 17.🛡️ Online: is it safe to check for https first? (a) not safe (b) safe
  18. 18.🔁 Which word runs code only when something is true? (a) if (b) log (c) let (d) for
  19. 19.🔐 Is iloveyou a strong or a weak password? (a) weak (b) strong
  20. 20.🖌️ What colour are the letters?
    p {
      color: yellow;
      background-color: purple;
      text-align: center;
      font-size: 12px;
    }
    (a) yellow (b) purple (c) orange
  21. 21.What does font-weight do? (a) picks the font style (b) makes the text bold (c) colours behind the text (d) sets the letter colour
  22. 22.⚡ What does alert() show? (a) a new tab (b) a table (c) a picture (d) a pop-up box
  23. 23.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an attribute (d) an element name
  24. 24.What is <input type="date"> for? (a) picks a day (b) is for an email address (c) lets you pick only one (d) lets you tick many
  25. 25.💬 How does an HTML comment start? (a) /* (b) <!-- (c) // (d) #
  26. 26.🎯 Which sign starts an id selector? (a) . (b) & (c) # (d) @
  27. 27.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  28. 28.🧭 How many <main> parts should a page have? (a) ten (b) three (c) none (d) one
  29. 29.💪 Which justify-content value packs boxes at the end? (a) flex-start (b) center (c) flex-end (d) space-between
  30. 30.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="350">
  31. 31.True or false: console.log(5 + 2); goes in script.js. (a) True (b) False
  32. 32.🔁 What does i++ do? (a) takes 1 from i (b) prints i (c) adds 1 to i (d) doubles i
  33. 33.✍️ CSS declarations go inside which brackets? (a) ( ) (b) [ ] (c) { } (d) < >
  34. 34.🌈 Which colour is #00ff00? (a) bright green (b) white (c) cyan (d) blue
  35. 35.True or false: <h1>My Site</h1> goes in script.js. (a) True (b) False
  36. 36.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Markup (c) Modern (d) Mouse
  37. 37.📱 Which tag helps phones show a page at the right size? (a) the br tag (b) the title tag (c) the viewport meta tag (d) the hr tag
  38. 38.🌐 Which one sends pages over the net? (a) a code editor (b) a web browser (c) a web server
  39. 39.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 10px;
      }
    }
  40. 40.📄 Can HTML on its own pick a random number? (a) No (b) Yes

Answer key

  1. stores a website’s files
  2. space-between
  3. 20
  4. <caption>
  5. ;
  6. </b>
  7. style.css
  8. <h6>
  9. an element selector
  10. yellow
  11. False
  12. an empty tag
  13. Yes
  14. <h6>
  15. True
  16. italic
  17. safe
  18. if
  19. weak
  20. yellow
  21. makes the text bold
  22. a pop-up box
  23. an attribute
  24. picks a day
  25. <!--
  26. #
  27. Yes
  28. one
  29. flex-end
  30. 350
  31. True
  32. adds 1 to i
  33. { }
  34. bright green
  35. False
  36. Markup
  37. the viewport meta tag
  38. a web server
  39. 12
  40. No

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