← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 149 · 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.🖌️ How big is the text, in px?
    h1 {
      color: purple;
      font-size: 32px;
      text-align: center;
      background-color: white;
    }
  2. 2.⚖️ Which selector is the weakest? (a) an id selector (b) a class selector (c) an element selector
  3. 3.Which of these does CSS do? (a) puts a picture on a page (b) makes a form box (c) gives the page structure (d) adds space around boxes
  4. 4.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <h2>My pets</h2>
    <h2>My pets</h2>
    <p>Our school trip</p>
    <p>Good morning!</p>
  5. 5.🎯 Which element does the selector #end style? (a) <h2 class="end"> (b) <h2 id="hero"> (c) <h2 id="end"> (d) <li class="box">
  6. 6.True or false: <input type="email"> is for one line of words. (a) False (b) True
  7. 7.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
  8. 8.🔒 Is the connection to this address scrambled (encrypted)?
    https://www.example.net/about.html
    (a) Yes (b) No
  9. 9.📊 Which tag holds the whole table? (a) <table> (b) <tr> (c) <th> (d) <td>
  10. 10.🌈 Which colour is #000000? (a) cyan (b) magenta (c) bright green (d) black
  11. 11.⚡ What does this code print? (Look at the quotes!)
    let x = "8";
    let y = 4;
    console.log(x + y);
    (a) 84 (b) Error (c) 12
  12. 12.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 300px;
      justify-content: flex-start;
    }
    Inside are 3 boxes, each 80px wide (no margins).
  13. 13.🔁 What does this code print?
    let score = 28;
    if (score >= 10) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) Play again (b) You win
  14. 14.🔢 To build and share your first web page, which comes first: “publish it online” or “write the HTML”? (a) write the HTML (b) publish it online
  15. 15.📱 The screen is 820px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 26px;
      }
    }
    (a) Yes (b) No
  16. 16.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Mango</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
  17. 17.📝 What does <br> do? (a) makes a list (b) starts a new line (c) makes text bold (d) adds a picture
  18. 18.✍️ How many declarations (property: value pairs) are in this rule?
    h2 {
      font-style: italic;
    }
  19. 19.♿ Does this help everyone, or make the page harder to use: write clear link text? (a) makes it harder (b) helps everyone
  20. 20.Which of these is margin? (a) space outside the border (b) the text or picture (c) the line round the box (d) the gap round content
  21. 21.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
  22. 22.✍️ How many declarations (property: value pairs) are in this rule?
    .note {
      font-weight: bold;
      font-size: 20px;
      border: 2px solid;
    }
  23. 23.True or false: <li> goes inside ul or ol. (a) False (b) True
  24. 24.🔁 How many numbers does this code print?
    for (let i = 0; i < 8; i = i + 3) {
      console.log(i);
    }
  25. 25.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) red (c) cyan (d) white
  26. 26.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="colour"> Red
      <input type="radio" name="colour"> Blue
      <input type="radio" name="colour"> Orange
      <input type="radio" name="colour"> Pink
      <input type="radio" name="colour"> Green
    </form>
  27. 27.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="sport"> Kabaddi
      <input type="checkbox" name="sport"> Football
      <input type="checkbox" name="sport"> Cricket
      <input type="checkbox" name="sport"> Hockey
      <input type="checkbox" name="sport"> Chess
    </form>
  28. 28.🚀 Which file should this code go in: <p>Hello!</p> (a) index.html (b) script.js (c) style.css
  29. 29.🌈 In #008500 the green part is the hex number 85. What is it as a normal number?
  30. 30.Which of these does CSS do? (a) sets colours and fonts (b) puts a picture on a page (c) gives the page structure (d) makes headings and lists
  31. 31.🖌️ Which CSS property sets the letter colour? (a) color (b) font-size (c) background-color (d) text-align
  32. 32.Which of these is a strong password? (a) 123456 (b) 111111 (c) Mango#Kite29! (d) iloveyou
  33. 33.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>The red kite</p>
    <!-- <p>Good morning!</p> -->
  34. 34.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
    (a) A tiger asleep (b) kite.png (c) tiger.jpg (d) map.png
  35. 35.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  36. 36.Which colour pair is hard to read? (a) white on black (b) yellow on black (c) blue on purple (d) white on dark blue
  37. 37.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h1> or <h5>? (a) <h5> (b) <h2> (c) <h4> (d) <h1>
  38. 38.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  39. 39.🔢 To build and share your first web page, what comes right after “test in a browser”? (a) add CSS styles (b) write the HTML (c) publish it online (d) plan what to show
  40. 40.⚖️ What colour is the text of this element?
    <h1 class="big" id="intro">Hi</h1>
    CSS:
    h1 { color: black; }
    h1 { color: purple; }
    (a) white (b) purple (c) red (d) black

Answer key

  1. 32
  2. an element selector
  3. adds space around boxes
  4. 3
  5. <h2 id="end">
  6. False
  7. red
  8. Yes
  9. <table>
  10. black
  11. 84
  12. 60
  13. You win
  14. write the HTML
  15. Yes
  16. 2
  17. starts a new line
  18. 1
  19. helps everyone
  20. space outside the border
  21. href
  22. 3
  23. True
  24. 3
  25. cyan
  26. 1
  27. 5
  28. index.html
  29. 133
  30. sets colours and fonts
  31. color
  32. Mango#Kite29!
  33. 2
  34. tiger.jpg
  35. No
  36. blue on purple
  37. <h5>
  38. a closing tag
  39. publish it online
  40. purple

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