← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 931 · 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 colour is rgb(255, 0, 0)? (a) red (b) black (c) white (d) blue
  2. 2.What does justify-content: space-between do? (a) packs boxes at the end (b) puts boxes in the middle (c) packs boxes at the start (d) equal gaps, none at ends
  3. 3.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the later one (c) the first one (d) the shorter one
  4. 4.Which of these is true of <aside>? (a) is the page’s key part (b) helps you move around (c) holds extra side notes (d) sits at the bottom
  5. 5.True or false: <caption> holds the whole table. (a) False (b) True
  6. 6.📋 Which list tag lists steps in order? (a) <ul> (b) <li> (c) <ol>
  7. 7.🎯 Which CSS selector matches this element?
    <li class="note" id="top">Hello</li>
    (a) div (b) .note (c) .top (d) #note
  8. 8.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to make it bigger (c) to describe the image (d) to colour it
  9. 9.⚡ Which JavaScript word makes a new variable? (a) for (b) alert() (c) if (d) let
  10. 10.True or false: “use big enough text” helps everyone use the page. (a) False (b) True
  11. 11.What does justify-content: flex-start 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
  12. 12.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) <h1/> (c) <h1> (d) </h1>
  13. 13.⚡ What does this code show?
    let name = "Kabir";
    console.log("Hi, " + name + "!");
    (a) Hi, Kabir! (b) Hi, name! (c) name (d) Kabir
  14. 14.🔁 How many times does this code print “Hi”?
    for (let i = 2; i < 6; i++) {
      console.log("Hi");
    }
  15. 15.🖌️ What colour are the letters?
    li {
      font-size: 20px;
      background-color: yellow;
      text-align: center;
      color: purple;
    }
    (a) purple (b) yellow (c) white
  16. 16.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>My best friend</p>
    <!-- <p>Rain today</p> -->
    (a) My best friend (b) The red kite (c) Rain today
  17. 17.🔢 When you open a web page, which comes LAST? (a) DNS finds the server (b) the browser shows it (c) you type the URL (d) the server sends files
  18. 18.Which of these is padding? (a) the line round the box (b) the gap to other boxes (c) space inside the border (d) a solid or dotted edge
  19. 19.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 170px;
      padding: 20px;
      border: 2px solid black;
      margin: 5px;
    }
  20. 20.📝 What does a password box show instead of letters? (a) numbers (b) dots (c) emojis (d) capital letters
  21. 21.🔢 To build and share your first web page, which comes first: “add CSS styles” or “write the HTML”? (a) add CSS styles (b) write the HTML
  22. 22.✍️ How does a CSS comment start? (a) // (b) # (c) /* (d) <!--
  23. 23.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
  24. 24.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 16; i = i + 2) {
      console.log(i);
    }
  25. 25.🔐 Is Rain#Drop_42! a strong or a weak password? (a) strong (b) weak
  26. 26.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 70px;
      padding: 20px;
      border: 3px solid black;
      margin: 10px;
    }
  27. 27.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
  28. 28.✍️ What is the selector in this CSS rule?
    li {
      font-weight: bold;
      color: red;
      padding: 8px;
      font-size: 20px;
    }
    (a) font-weight (b) body (c) red (d) li
  29. 29.True or false: <main> holds a news story. (a) True (b) False
  30. 30.🖌️ What colour are the letters?
    h2 {
      background-color: yellow;
      text-align: right;
      color: black;
      font-size: 12px;
    }
    (a) yellow (b) black (c) white
  31. 31.True or false: a code editor shows line numbers. (a) True (b) False
  32. 32.⚖️ What colour is the text of this element?
    <p class="star" id="hero">Hi</p>
    CSS:
    #hero { color: purple; }
    p { color: red; }
    (a) purple (b) green (c) yellow (d) red
  33. 33.📄 Can HTML on its own pick a random number? (a) Yes (b) No
  34. 34.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Kites fly high</p>
  35. 35.True or false: <title> has a closing tag. (a) False (b) True
  36. 36.True or false: “tiny grey text” helps everyone use the page. (a) False (b) True
  37. 37.🎯 Which sign starts an id selector? (a) # (b) @ (c) & (d) .
  38. 38.Which of these is a closing tag? (a) </b> (b) <p> (c) <title> (d) <body>
  39. 39.🔢 To build and share your first web page, what comes right after “test in a browser”? (a) write the HTML (b) add CSS styles (c) publish it online (d) plan what to show
  40. 40.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <h3>Fun facts</h3>
    <h4>My best friend</h4>

Answer key

  1. red
  2. equal gaps, none at ends
  3. the later one
  4. holds extra side notes
  5. False
  6. <ol>
  7. .note
  8. to describe the image
  9. let
  10. True
  11. packs boxes at the start
  12. </h1>
  13. Hi, Kabir!
  14. 4
  15. purple
  16. Rain today
  17. the browser shows it
  18. space inside the border
  19. 224
  20. dots
  21. write the HTML
  22. /*
  23. <ul>
  24. 14
  25. strong
  26. 136
  27. <img>
  28. li
  29. False
  30. black
  31. True
  32. purple
  33. No
  34. 2
  35. True
  36. False
  37. #
  38. </b>
  39. publish it online
  40. 3

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