← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 955 · 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 selector is the weakest? (a) an element selector (b) a class selector (c) an id selector
  2. 2.🧩 Which language makes a form box? (a) CSS (b) HTML (c) JavaScript
  3. 3.💪 Which flexbox property spaces boxes along a row? (a) align-items (b) display: flex (c) justify-content (d) gap
  4. 4.♿ Is this heading order correct (no level skipped)?
    <h1> → <h2> → <h2> → <h2>
    (a) No (b) Yes
  5. 5.🔐 Is Mango#Kite29! a strong or a weak password? (a) weak (b) strong
  6. 6.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h5> or <h2>? (a) <h5> (b) <h2> (c) <h1> (d) <h6>
  7. 7.True or false: <header> holds one blog post. (a) False (b) True
  8. 8.🔍 Which is the odd one out? (a) makes headings and lists (b) makes a form box (c) shows a pop-up message (d) makes a link
  9. 9.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="50">
    (a) Our school bus (b) width (c) moon.png (d) The full moon
  10. 10.🔍 Which is the odd one out? (a) changes the page live (b) makes a link (c) checks a quiz answer (d) reacts to a button click
  11. 11.True or false: <table> makes one data cell. (a) True (b) False
  12. 12.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 16px;
      }
    }
  13. 13.🔁 Which word runs code only when something is true? (a) log (b) if (c) let (d) for
  14. 14.✍️ Which property is set to 8px in this rule?
    body {
      padding: 8px;
      text-align: center;
      font-style: italic;
      font-size: 20px;
    }
    (a) font-weight (b) border (c) 8px (d) padding
  15. 15.True or false: alert("Hi"); goes in script.js. (a) False (b) True
  16. 16.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) magenta (c) bright green (d) blue
  17. 17.🧩 Which language counts down a timer? (a) CSS (b) JavaScript (c) HTML
  18. 18.✍️ How many declarations (property: value pairs) are in this rule?
    p {
      font-weight: bold;
      margin: 10px;
      padding: 8px;
      text-align: center;
    }
  19. 19.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) ( (d) {
  20. 20.📊 How many rows does this table have?
    <table>
      <tr><td>Mango</td><td>Banana</td></tr>
      <tr><td>Mango</td><td>Orange</td></tr>
      <tr><td>Grapes</td><td>Orange</td></tr>
    </table>
  21. 21.True or false: <tr> makes one table row. (a) False (b) True
  22. 22.🌈 Which hex code is black? (a) #00ff00 (b) #00ffff (c) #0000ff (d) #000000
  23. 23.🔁 What does this code print?
    let marks = 43;
    if (marks > 16) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Try again (b) Pass
  24. 24.⚡ What does this code print? (Look at the quotes!)
    let x = "3";
    let y = 9;
    console.log(x + y);
    (a) 39 (b) Error (c) 12
  25. 25.🧭 Is <nav> semantic or not semantic? (a) not semantic (b) semantic
  26. 26.🧭 Is <main> semantic or not semantic? (a) not semantic (b) semantic
  27. 27.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the first one (b) the later one (c) the shorter one (d) neither
  28. 28.Which of these is a closing tag? (a) <h1> (b) </b> (c) <li> (d) <p>
  29. 29.🔢 To build and share your first web page, which comes first: “plan what to show” or “add CSS styles”? (a) add CSS styles (b) plan what to show
  30. 30.💪 Which flexbox property sets space between boxes? (a) gap (b) flex-direction (c) align-items (d) justify-content
  31. 31.🧭 How many <main> parts should a page have? (a) one (b) three (c) ten (d) none
  32. 32.🖌️ What colour is behind the letters?
    li {
      font-size: 24px;
      text-align: center;
      color: red;
      background-color: blue;
    }
    (a) green (b) blue (c) red
  33. 33.🏷️ Which is the closing tag for <u>? (a) <u/> (b) <u> (c) </u> (d) <\u>
  34. 34.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) makes a list (d) starts a new line
  35. 35.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
  36. 36.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) src (c) width (d) height
  37. 37.🔍 Which is the odd one out? (a) gives the page structure (b) makes a form box (c) reacts to a button click (d) puts a picture on a page
  38. 38.♿ Is this heading order correct (no level skipped)?
    <h1> → <h3> → <h2> → <h2>
    (a) Yes (b) No
  39. 39.🎯 Which sign starts a class selector? (a) @ (b) # (c) & (d) .
  40. 40.📱 The screen is 414px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 8px;
      }
    }
    (a) No (b) Yes

Answer key

  1. an element selector
  2. HTML
  3. justify-content
  4. Yes
  5. strong
  6. <h6>
  7. False
  8. shows a pop-up message
  9. The full moon
  10. makes a link
  11. False
  12. 12
  13. if
  14. padding
  15. True
  16. blue
  17. JavaScript
  18. 4
  19. <
  20. 3
  21. True
  22. #000000
  23. Pass
  24. 39
  25. semantic
  26. semantic
  27. the later one
  28. </b>
  29. plan what to show
  30. gap
  31. one
  32. blue
  33. </u>
  34. starts a new line
  35. <ol>
  36. width
  37. reacts to a button click
  38. No
  39. .
  40. Yes

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