← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 699 · 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 code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
  2. 2.🖌️ What colour are the letters?
    li {
      background-color: blue;
      text-align: right;
      font-size: 36px;
      color: purple;
    }
    (a) purple (b) orange (c) blue
  3. 3.📋 Which list suits a shopping list in any order? (a) <br> (b) <ul> (c) <hr> (d) <ol>
  4. 4.True or false: <input type="email"> takes only numbers. (a) False (b) True
  5. 5.Which of these is a strong password? (a) riya2014 (b) Blue@Tiger_74 (c) abcd1234 (d) 123456
  6. 6.⚖️ What colour is the text of this element?
    <h2 class="note" id="intro">Hi</h2>
    CSS:
    h2 { color: blue; }
    h2 { color: green; }
    (a) purple (b) blue (c) yellow (d) green
  7. 7.💪 Which justify-content value packs boxes at the end? (a) space-between (b) flex-end (c) center (d) flex-start
  8. 8.True or false: <article> holds one blog post. (a) False (b) True
  9. 9.True or false: li is an element selector. (a) True (b) False
  10. 10.True or false: the browser scrambles data on its way. (a) False (b) True
  11. 11.🎯 Which element does the selector .note style? (a) <h1 class="red"> (b) <p id="note"> (c) <p class="big"> (d) <p class="note">
  12. 12.🌈 Which hex code is red? (a) #00ff00 (b) #000000 (c) #00ffff (d) #ff0000
  13. 13.True or false: “use big enough text” makes the page harder to use. (a) False (b) True
  14. 14.✍️ Which property is set to bold in this rule?
    #top {
      font-weight: bold;
      padding: 8px;
      text-align: center;
      margin: 10px;
    }
    (a) bold (b) font-weight (c) border (d) width
  15. 15.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as a new line (c) as 5 spaces (d) as one space
  16. 16.📱 What does a media query check? (a) the battery level (b) the screen width (c) the page title (d) the time of day
  17. 17.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  18. 18.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Mango</li>
    </ul>
    (a) bullets (b) numbers
  19. 19.📊 In a table, which tag is a row? (a) <tr> (b) <tb> (c) <th> (d) <td>
  20. 20.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>The red kite</p> -->
    <p>Fun facts</p>
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
  21. 21.🔗 Which address opens when you click this link?
    <a href="https://example.com">Art corner</a>
    (a) https://example.com (b) Art corner (c) maths.html (d) art.html
  22. 22.True or false: HTML on its own cannot count button clicks. (a) True (b) False
  23. 23.Which of these is an empty tag? (a) <ul> (b) <p> (c) <img> (d) <title>
  24. 24.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 260px;
      justify-content: space-between;
    }
    Inside are 3 boxes, each 80px wide (no margins).
  25. 25.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <ul> (d) <li>
  26. 26.True or false: .box { padding: 8px; } goes in index.html. (a) True (b) False
  27. 27.🖌️ What colour is behind the letters?
    h2 {
      text-align: right;
      font-size: 16px;
      background-color: orange;
      color: black;
    }
    (a) black (b) yellow (c) orange
  28. 28.What does background-color do? (a) sets the letter colour (b) picks the font style (c) colours behind the text (d) centres a heading
  29. 29.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Roses are red<br>Sky is blue<br>Birds sing</p>
  30. 30.🔁 What does this code print?
    let age = 2;
    if (age < 30) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) child (b) teen
  31. 31.🔢 When you open a web page, what comes right after “you type the URL”? (a) DNS finds the server (b) the server sends files (c) the browser asks it (d) the browser shows it
  32. 32.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) <h3> (c) </h3> (d) <h3/>
  33. 33.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>My best friend</p>
    <p>Hello, world!</p>
    <p>Our school trip</p>
    (a) My best friend (b) Hello, world! (c) Our school trip (d) I love mangoes.
  34. 34.⚡ Which JavaScript word repeats code? (a) console.log() (b) alert() (c) let (d) for
  35. 35.Which of these has a closing tag? (a) <li> (b) <br> (c) <img> (d) <meta>
  36. 36.✍️ How many declarations (property: value pairs) are in this rule?
    .note {
      font-weight: bold;
      border: 2px solid;
      font-style: italic;
    }
  37. 37.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
    <p>My pets</p>
    (a) Our school trip (b) My pets (c) Cricket is fun.
  38. 38.📄 Can HTML on its own pick a random number? (a) Yes (b) No
  39. 39.🔗 Which address opens when you click this link?
    <a href="https://example.com">Contact us</a>
    (a) maths.html (b) art.html (c) https://example.com (d) Contact us
  40. 40.Which of these is true of a web browser? (a) turns HTML into a page (b) is where we type code (c) shows line numbers (d) saves our .html files

Answer key

  1. <a href="about.html">
  2. purple
  3. <ul>
  4. False
  5. Blue@Tiger_74
  6. green
  7. flex-end
  8. True
  9. True
  10. False
  11. <p class="note">
  12. #ff0000
  13. False
  14. font-weight
  15. as one space
  16. the screen width
  17. Yes
  18. bullets
  19. <tr>
  20. 3
  21. https://example.com
  22. True
  23. <img>
  24. 10
  25. <li>
  26. False
  27. orange
  28. colours behind the text
  29. 4
  30. teen
  31. DNS finds the server
  32. </h3>
  33. I love mangoes.
  34. for
  35. <li>
  36. 3
  37. Cricket is fun.
  38. No
  39. https://example.com
  40. turns HTML into a page

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