← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 998 · 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.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
  2. 2.✍️ Which property is set to italic in this rule?
    h1 {
      font-style: italic;
      color: red;
      width: 300px;
    }
    (a) color (b) italic (c) font-style (d) font-size
  3. 3.Which of these is an opening tag? (a) </body> (b) <b> (c) </b> (d) </p>
  4. 4.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
    (a) My pets (b) Good morning! (c) I love mangoes.
  5. 5.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <p> (d) <h1>
  6. 6.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
  7. 7.True or false: to check for https first is safe. (a) True (b) False
  8. 8.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
  9. 9.Which of these does HTML do? (a) lays out the page (b) sets colours and fonts (c) shows a pop-up message (d) gives the page structure
  10. 10.📋 What number does the browser show next to “Banana”?
    <ol start="5">
      <li>Guava</li>
      <li>Orange</li>
      <li>Banana</li>
    </ol>
  11. 11.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Banana</li>
    </ul>
  12. 12.True or false: <li> goes inside ul or ol. (a) False (b) True
  13. 13.📝 Which tag holds a whole form? (a) <ol> (b) <table> (c) <input> (d) <form>
  14. 14.⚡ What does this code print? (Look at the quotes!)
    let x = "9";
    let y = 2;
    console.log(x + y);
    (a) 92 (b) Error (c) 11
  15. 15.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="350">
    (a) The full moon (b) fort.jpg (c) bus.jpg (d) moon.png
  16. 16.🖌️ How big is the text, in px?
    h2 {
      color: red;
      font-size: 40px;
      text-align: left;
      background-color: black;
    }
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <small>The red kite</small>
    line 2: <b>My best friend</b>
    line 3: <strong>Fun facts
    (a) line 1 (b) line 2 (c) line 3
  18. 18.♿ Who uses a screen reader? (a) people who are blind (b) only robots (c) only teachers (d) only coders
  19. 19.Which of these is an opening tag? (a) </title> (b) <p> (c) </p> (d) </li>
  20. 20.🔁 Which word runs code only when something is true? (a) log (b) for (c) if (d) let
  21. 21.🔁 How many times does this code print “Well done”?
    for (let i = 3; i <= 12; i++) {
      console.log("Well done");
    }
  22. 22.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 160px;
      justify-content: flex-end;
    }
    Inside are 2 boxes, each 50px wide (no margins).
  23. 23.⚖️ What colour is the text of this element?
    <h2 class="star" id="hero">Hi</h2>
    CSS:
    .star { color: blue; }
    h2 { color: orange; }
    #hero { color: red; }
    (a) black (b) blue (c) orange (d) red
  24. 24.Which of these does HTML do? (a) checks a quiz answer (b) lays out the page (c) makes a link (d) counts down a timer
  25. 25.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Kites fly high<br>Stars shine<br>Birds sing<br>Rivers flow</p>
  26. 26.🔁 When does the else part run? (a) when if is false (b) never (c) when if is true (d) always
  27. 27.📱 The screen is 540px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 14px;
      }
    }
    (a) No (b) Yes
  28. 28.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <ul> (d) <li>
  29. 29.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) white (c) black (d) bright green
  30. 30.🎯 What kind of selector is #top? (a) an element selector (b) a class selector (c) an id selector
  31. 31.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) black (c) bright green (d) red
  32. 32.🔍 Which line is missing its closing tag?
    line 1: <em>Our school trip</em>
    line 2: <u>I love mangoes.
    line 3: <small>My pets</small>
    (a) line 1 (b) line 2 (c) line 3
  33. 33.⚡ What does this code show?
    let name = "Zoya";
    alert("Welcome, " + name + "!");
    (a) Welcome, Zoya! (b) name (c) Zoya (d) Welcome, name!
  34. 34.📱 max-width: 600px applies when the screen is ___. (a) exactly 1000px (b) turned off (c) 600px or narrower (d) 600px or wider
  35. 35.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>Our school trip</p>
    <p>Our school trip</p>
    <h2>My pets</h2>
    <h2>Cricket is fun.</h2>
    <p>My pets</p>
  36. 36.📄 Which part holds everything you see on the page? (a) the doctype (b) the body (c) the head (d) the title
  37. 37.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Good morning!</p>
    <p>Fun facts</p>
    (a) Good morning! (b) Hello, world! (c) Fun facts
  38. 38.💪 Which justify-content value packs boxes at the start? (a) flex-end (b) center (c) flex-start (d) space-between
  39. 39.True or false: the browser shows the page to you. (a) False (b) True
  40. 40.🧭 Which semantic tag holds the logo and title? (a) <nav> (b) <header> (c) <article> (d) <aside>

Answer key

  1. False
  2. font-style
  3. <b>
  4. Good morning!
  5. <h6>
  6. 1
  7. True
  8. blue
  9. gives the page structure
  10. 7
  11. 5
  12. True
  13. <form>
  14. 92
  15. moon.png
  16. 40
  17. line 3
  18. people who are blind
  19. <p>
  20. if
  21. 10
  22. 60
  23. red
  24. makes a link
  25. 5
  26. when if is false
  27. Yes
  28. <li>
  29. bright green
  30. an id selector
  31. black
  32. line 2
  33. Welcome, Zoya!
  34. 600px or narrower
  35. 4
  36. the body
  37. Hello, world!
  38. flex-start
  39. True
  40. <header>

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