← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 546 · 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.🔢 When you open a web page, which comes first: “you type the URL” or “the server sends files”? (a) the server sends files (b) you type the URL
  2. 2.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) ( (d) <
  3. 3.⚡ Which JavaScript word repeats code? (a) let (b) alert() (c) console.log() (d) for
  4. 4.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue<br>Rivers flow<br>Stars shine</p>
  5. 5.🔗 Which address opens when you click this link?
    <a href="quiz.html">Maths fun</a>
    (a) games.html (b) quiz.html (c) Maths fun (d) about.html
  6. 6.True or false: p { color: red; } goes in script.js. (a) True (b) False
  7. 7.Which of these goes in the body? (a) <table> (b) <link rel="stylesheet"> (c) <meta charset="utf-8"> (d) <style>
  8. 8.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) height (d) width
  9. 9.💬 How does an HTML comment start? (a) <!-- (b) /* (c) // (d) #
  10. 10.🔍 Which is the odd one out? (a) saves our .html files (b) opens web pages for us (c) has an address bar (d) turns HTML into a page
  11. 11.✍️ In color: blue; which part is the value? (a) color (b) ; (c) : (d) blue
  12. 12.📝 What does <br> do? (a) makes text bold (b) makes a list (c) starts a new line (d) adds a picture
  13. 13.🎯 Which CSS selector matches this element?
    <h2 class="note" id="hero">Hello</h2>
    (a) h2 (b) .hero (c) #note (d) .big
  14. 14.True or false: a web server has an address bar. (a) False (b) True
  15. 15.⚡ What number does this code print?
    let score = 16;
    score = score + 11;
    score = score - 1;
    console.log(score);
  16. 16.🎯 What kind of selector is .card? (a) an id selector (b) an element selector (c) a class selector
  17. 17.⚡ What number does this code print?
    let apples = 6;
    apples = apples + 11;
    apples = apples - 5;
    console.log(apples);
  18. 18.⚡ What number does this code print?
    let apples = 10;
    apples = apples + 5;
    apples = apples - 3;
    console.log(apples);
  19. 19.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 130px;
      padding: 15px;
      border: 1px solid black;
      margin: 20px;
    }
  20. 20.True or false: “use headings in order” helps everyone use the page. (a) False (b) True
  21. 21.📱 The screen is 700px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 16px;
      }
    }
    (a) No (b) Yes
  22. 22.True or false: <title> goes in the body. (a) False (b) True
  23. 23.True or false: the content is the gap to other boxes. (a) False (b) True
  24. 24.🎯 What kind of selector is #main? (a) an element selector (b) a class selector (c) an id selector
  25. 25.✍️ Which property is set to italic in this rule?
    h1 {
      color: red;
      padding: 8px;
      font-style: italic;
    }
    (a) color (b) font-style (c) italic (d) font-size
  26. 26.True or false: <img src="cat.png"> goes in index.html. (a) True (b) False
  27. 27.True or false: <td> makes one data cell. (a) True (b) False
  28. 28.⚖️ What colour is the text of this element?
    <h1 class="red" id="hero">Hi</h1>
    CSS:
    #hero { color: white; }
    #hero { color: blue; }
    (a) black (b) yellow (c) white (d) blue
  29. 29.🧭 Why use <nav> instead of <div> for a menu? (a) it tells its meaning (b) it loads faster (c) it makes text red (d) it adds pictures
  30. 30.🎯 Which element does the selector li style? (a) <div> (b) <p id="logo"> (c) <span class="box"> (d) <li class="box">
  31. 31.⚡ What number does this code print?
    let a = 9;
    let b = 4;
    console.log(a - b);
  32. 32.True or false: <h1> goes in the head. (a) True (b) False
  33. 33.🎯 Which sign starts an id selector? (a) # (b) @ (c) & (d) .
  34. 34.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) G (d) J
  35. 35.💪 Which flexbox property turns on flexbox? (a) align-items (b) display: flex (c) justify-content (d) gap
  36. 36.📱 The screen is 375px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 14px;
      }
    }
    (a) Yes (b) No
  37. 37.Which colour pair is hard to read? (a) dark grey on white (b) black on white (c) white on black (d) red on green
  38. 38.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a hash # (d) a slash /
  39. 39.🔗 Where does this link open?
    <a href="about.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  40. 40.🌈 Which hex code is red? (a) #00ffff (b) #ff0000 (c) #ffffff (d) #00ff00

Answer key

  1. you type the URL
  2. <
  3. for
  4. 4
  5. quiz.html
  6. False
  7. <table>
  8. height
  9. <!--
  10. saves our .html files
  11. blue
  12. starts a new line
  13. h2
  14. False
  15. 26
  16. a class selector
  17. 12
  18. 12
  19. 202
  20. True
  21. Yes
  22. False
  23. False
  24. an id selector
  25. font-style
  26. True
  27. True
  28. blue
  29. it tells its meaning
  30. <li class="box">
  31. 5
  32. False
  33. #
  34. F
  35. display: flex
  36. No
  37. red on green
  38. a slash /
  39. in a new tab
  40. #ff0000

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