← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 334 · 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.✍️ CSS declarations go inside which brackets? (a) ( ) (b) [ ] (c) < > (d) { }
  2. 2.Which colour pair is easy to read? (a) yellow on white (b) dark grey on white (c) blue on purple (d) light grey on white
  3. 3.🛡️ Online: is it safe to share your OTP? (a) safe (b) not safe
  4. 4.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 60px;
      padding: 30px;
      border: 3px solid black;
      margin: 10px;
    }
  5. 5.🔢 To build and share your first web page, which comes first: “write the HTML” or “test in a browser”? (a) test in a browser (b) write the HTML
  6. 6.🌈 In #005200 the green part is the hex number 52. What is it as a normal number?
  7. 7.🎯 Which CSS selector matches this element?
    <h2 class="big" id="hero">Hello</h2>
    (a) li (b) .big (c) .red (d) #top
  8. 8.🎯 What kind of selector is .star? (a) an element selector (b) a class selector (c) an id selector
  9. 9.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 90px;
      padding: 25px;
      border: 1px solid black;
      margin: 10px;
    }
  10. 10.📝 Which input type is for one line of words? (a) submit (b) number (c) text (d) email
  11. 11.True or false: a web browser stores a website’s files. (a) False (b) True
  12. 12.💾 A web page file usually ends with which extension? (a) .png (b) .html (c) .mp3 (d) .txt
  13. 13.🏷️ Which is the closing tag for <p>? (a) <p> (b) <\p> (c) </p> (d) <p/>
  14. 14.🖌️ What colour is behind the letters?
    p {
      color: white;
      font-size: 36px;
      background-color: blue;
      text-align: left;
    }
    (a) blue (b) black (c) white
  15. 15.✍️ In color: blue; which part is the value? (a) : (b) blue (c) color (d) ;
  16. 16.🌈 Which colour of light is strongest in rgb(160, 84, 64)? (a) blue (b) green (c) red
  17. 17.True or false: <p>Hello!</p> goes in index.html. (a) False (b) True
  18. 18.True or false: <header> holds a news story. (a) False (b) True
  19. 19.What does justify-content: center do? (a) packs boxes at the end (b) equal gaps, none at ends (c) puts boxes in the middle (d) packs boxes at the start
  20. 20.True or false: a web server sends pages over the net. (a) False (b) True
  21. 21.♿ Is this heading order correct (no level skipped)?
    <h1> → <h1> → <h1> → <h3>
    (a) No (b) Yes
  22. 22.🖌️ What colour is behind the letters?
    h2 {
      font-size: 32px;
      color: red;
      text-align: left;
      background-color: white;
    }
    (a) red (b) green (c) white
  23. 23.✍️ How many declarations (property: value pairs) are in this rule?
    li {
      text-align: center;
      margin: 10px;
      font-style: italic;
      font-weight: bold;
    }
  24. 24.Which of these is not safe to do online? (a) think before you post (b) ask before downloading (c) log out on shared PCs (d) post your home address
  25. 25.📦 In the box model, which part is a solid or dotted edge? (a) content (b) margin (c) padding (d) border
  26. 26.True or false: <img> has a closing tag. (a) True (b) False
  27. 27.🔁 What does this code print?
    let age = 7;
    if (age > 5) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  28. 28.⚡ What number does this code print?
    let a = 48;
    let b = 28;
    console.log(a + b);
  29. 29.True or false: <input type="date"> picks a day. (a) True (b) False
  30. 30.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) height (c) src (d) alt
  31. 31.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Orange</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  32. 32.What does justify-content: flex-end do? (a) packs boxes at the end (b) packs boxes at the start (c) puts boxes in the middle (d) equal gaps, none at ends
  33. 33.🛡️ Online: is it safe to put secrets in comments? (a) safe (b) not safe
  34. 34.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h1> or <h3>? (a) <h1> (b) <h5> (c) <h3> (d) <h6>
  35. 35.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <ol> (d) <li>
  36. 36.🔍 Which is the odd one out? (a) sets colours and fonts (b) adds space around boxes (c) changes the text size (d) gives the page structure
  37. 37.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  38. 38.🏷️ Which is the closing tag for <strong>? (a) <\strong> (b) <strong/> (c) </strong> (d) <strong>
  39. 39.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>Fun facts</p>
    <!-- <p>Our school trip</p> -->
    (a) Rain today (b) Our school trip (c) Fun facts
  40. 40.True or false: body is a class selector. (a) False (b) True

Answer key

  1. { }
  2. dark grey on white
  3. not safe
  4. 146
  5. write the HTML
  6. 82
  7. .big
  8. a class selector
  9. 142
  10. text
  11. False
  12. .html
  13. </p>
  14. blue
  15. blue
  16. red
  17. True
  18. False
  19. puts boxes in the middle
  20. True
  21. No
  22. white
  23. 4
  24. post your home address
  25. border
  26. False
  27. teen
  28. 76
  29. True
  30. alt
  31. 5
  32. packs boxes at the end
  33. not safe
  34. <h6>
  35. <li>
  36. gives the page structure
  37. an empty tag
  38. </strong>
  39. Our school trip
  40. False

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