← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 147 · 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 CSS property makes the text bold? (a) font-size (b) font-family (c) color (d) font-weight
  2. 2.What does font-family do? (a) sets the letter colour (b) picks the font style (c) centres a heading (d) makes the text bold
  3. 3.🔢 In a basic web page file, which comes first: “</body>” or “<head>”? (a) </body> (b) <head>
  4. 4.⚖️ What colour is the text of this element?
    <p class="star" id="top">Hi</p>
    CSS:
    p { color: orange; }
    p { color: purple; }
    (a) blue (b) red (c) orange (d) purple
  5. 5.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
  6. 6.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  7. 7.🔁 How many times does this code print “Well done”?
    for (let i = 0; i <= 4; i++) {
      console.log("Well done");
    }
  8. 8.True or false: HTML checks a quiz answer. (a) False (b) True
  9. 9.🎯 What kind of selector is img? (a) an element selector (b) a class selector (c) an id selector
  10. 10.🧭 Why use <nav> instead of <div> for a menu? (a) it makes text red (b) it loads faster (c) it tells its meaning (d) it adds pictures
  11. 11.📊 Where do <td> cells go? (a) inside a <li> (b) inside the <head> (c) inside a <p> (d) inside a <tr>
  12. 12.🔗 Which words do you click on?
    <a href="about.html">Maths fun</a>
    (a) Art corner (b) Maths fun (c) href (d) about.html
  13. 13.🖌️ How big is the text, in px?
    h1 {
      font-size: 20px;
      background-color: green;
      color: yellow;
      text-align: center;
    }
  14. 14.✍️ How does a CSS comment start? (a) # (b) // (c) <!-- (d) /*
  15. 15.🔗 Which words do you click on?
    <a href="contact.html">Take the quiz</a>
    (a) href (b) Play games (c) contact.html (d) Take the quiz
  16. 16.Which of these does HTML do? (a) rounds box corners (b) counts down a timer (c) adds space around boxes (d) makes a form box
  17. 17.🔍 Which is the odd one out? (a) turns HTML into a page (b) hosts websites online (c) answers page requests (d) sends pages over the net
  18. 18.🛡️ Online: is it safe to put secrets in comments? (a) safe (b) not safe
  19. 19.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h4> or <h1>? (a) <h4> (b) <h5> (c) <h1> (d) <h3>
  20. 20.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 280px;
      justify-content: space-between;
    }
    Inside are 2 boxes, each 100px wide (no margins).
  21. 21.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 150px;
      padding: 20px;
      border: 5px solid black;
      margin: 10px;
    }
  22. 22.🔍 Which line is missing its closing tag?
    line 1: <h1>The red kite</h1>
    line 2: <b>My best friend</b>
    line 3: <h3>Good morning!
    (a) line 3 (b) line 1 (c) line 2
  23. 23.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 3 (d) 2
  24. 24.What is <input type="password"> for? (a) sends the form (b) is for one line of words (c) lets you pick only one (d) hides what you type
  25. 25.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ul>
    (a) numbers (b) bullets
  26. 26.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Rain today</p>
    <p>The red kite</p>
  27. 27.True or false: <header> sits at the very top. (a) False (b) True
  28. 28.🔁 Which word runs code only when something is true? (a) if (b) for (c) let (d) log
  29. 29.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 110px;
      padding: 25px;
      border: 1px solid black;
      margin: 5px;
    }
  30. 30.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine<br>Roses are red<br>Rivers flow</p>
  31. 31.⚖️ What colour is the text of this element?
    <h2 class="note" id="intro">Hi</h2>
    CSS:
    h2 { color: orange; }
    h2 { color: green; }
    (a) blue (b) green (c) orange (d) white
  32. 32.💬 How does an HTML comment end? (a) --> (b) // (c) >> (d) */
  33. 33.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h6> or <h1>? (a) <h4> (b) <h6> (c) <h1> (d) <h5>
  34. 34.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 9; i++) {
      total = total + 9;
    }
    console.log(total);
  35. 35.🔢 In a basic web page file, which comes first: “<html>” or “</body>”? (a) <html> (b) </body>
  36. 36.True or false: HTML on its own can make headings. (a) True (b) False
  37. 37.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
  38. 38.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 22px;
      }
    }
  39. 39.True or false: “use headings in order” helps everyone use the page. (a) True (b) False
  40. 40.🌗 Is white on black easy or hard to read? (a) hard to read (b) easy to read

Answer key

  1. font-weight
  2. picks the font style
  3. <head>
  4. purple
  5. in the body
  6. No
  7. 5
  8. False
  9. an element selector
  10. it tells its meaning
  11. inside a <tr>
  12. Maths fun
  13. 20
  14. /*
  15. Take the quiz
  16. makes a form box
  17. turns HTML into a page
  18. not safe
  19. <h5>
  20. 80
  21. 200
  22. line 3
  23. 3
  24. hides what you type
  25. bullets
  26. 3
  27. True
  28. if
  29. 162
  30. 4
  31. green
  32. -->
  33. <h1>
  34. 81
  35. <html>
  36. True
  37. a line across the page
  38. 22
  39. True
  40. easy to read

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