← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 816 · 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 address opens when you click this link?
    <a href="maths.html">Contact us</a>
    (a) art.html (b) Contact us (c) news.html (d) maths.html
  2. 2.🌈 Which colour is #ff0000? (a) magenta (b) red (c) blue (d) black
  3. 3.📊 Which tag holds the whole table? (a) <tr> (b) <td> (c) <table> (d) <th>
  4. 4.💪 Which justify-content value packs boxes at the start? (a) space-between (b) flex-start (c) flex-end (d) center
  5. 5.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h4>Rain today</h4>
    <p>Rain today</p>
    <h3>Rain today</h3>
  6. 6.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 9; i++) {
      total = total + 5;
    }
    console.log(total);
  7. 7.⚡ Which word makes a new variable? (a) let (b) give (c) put (d) make
  8. 8.⚡ Which tag holds JavaScript in a page? (a) <style> (b) <script> (c) <code> (d) <js>
  9. 9.True or false: CSS gives the page structure. (a) False (b) True
  10. 10.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
  11. 11.🔗 Which words do you click on?
    <a href="quiz.html">Art corner</a>
    (a) href (b) School news (c) quiz.html (d) Art corner
  12. 12.📝 How many <input> tags are in this form?
    <form>
      <input type="email">
      <input type="password">
      <input type="submit" value="Send">
    </form>
  13. 13.🔐 Is 111111 a strong or a weak password? (a) strong (b) weak
  14. 14.⚖️ What colour is the text of this element?
    <p class="red" id="end">Hi</p>
    CSS:
    .red { color: red; }
    p { color: blue; }
    (a) blue (b) white (c) orange (d) red
  15. 15.🔍 One closing tag is missing. Which one?
    <strong>I love mangoes.</strong>
    <small>Cricket is fun.</small>
    <h3>Good morning!
    (a) </strong> (b) </b> (c) </h3> (d) </small>
  16. 16.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="sport"> Hockey
      <input type="checkbox" name="sport"> Kabaddi
      <input type="checkbox" name="sport"> Football
    </form>
  17. 17.🚀 Which file should this code go in: p { color: red; } (a) style.css (b) index.html (c) script.js
  18. 18.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
  19. 19.True or false: the server sends the page back. (a) True (b) False
  20. 20.📱 The screen is 700px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 32px;
      }
    }
    (a) No (b) Yes
  21. 21.🎯 Which CSS selector matches this element?
    <span class="menu" id="logo">Hello</span>
    (a) #end (b) .logo (c) #menu (d) #logo
  22. 22.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 260px;
      justify-content: center;
    }
    Inside are 2 boxes, each 50px wide (no margins).
  23. 23.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
  24. 24.🎯 Which CSS selector matches this element?
    <h1 class="big" id="intro">Hello</h1>
    (a) .red (b) .big (c) #big (d) .intro
  25. 25.⚖️ Which selector is the strongest? (a) an id selector (b) an element selector (c) a class selector
  26. 26.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Banana</td><td>Guava</td><td>Grapes</td></tr>
      <tr><td>Mango</td><td>Litchi</td><td>Mango</td></tr>
      <tr><td>Guava</td><td>Jamun</td><td>Litchi</td></tr>
    </table>
  27. 27.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    (a) My pets (b) Fun facts (c) Cricket is fun. (d) I love mangoes.
  28. 28.True or false: <ul> lists steps in order. (a) False (b) True
  29. 29.📦 In the box model, which part is the text or picture? (a) padding (b) border (c) margin (d) content
  30. 30.What does font-family do? (a) picks the font style (b) centres a heading (c) colours behind the text (d) makes letters bigger
  31. 31.🖌️ Which CSS property centres a heading? (a) font-weight (b) text-align (c) font-family (d) background-color
  32. 32.🚀 Which tag loads script.js into a page? (a) <a href="script.js"> (b) <link script.js> (c) <js src="script.js"> (d) <script src="script.js">
  33. 33.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="50">
  34. 34.Which of these is true of a web browser? (a) stores a website’s files (b) colours code to help us (c) is where we type code (d) turns HTML into a page
  35. 35.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 20px;
      }
    }
  36. 36.⚖️ What colour is the text of this element?
    <h2 class="box" id="main">Hi</h2>
    CSS:
    h2 { color: blue; }
    h2 { color: black; }
    (a) red (b) blue (c) white (d) black
  37. 37.⚖️ What colour is the text of this element?
    <h1 class="box" id="main">Hi</h1>
    CSS:
    .box { color: green; }
    .box { color: yellow; }
    (a) yellow (b) blue (c) green (d) black
  38. 38.📊 Where do <td> cells go? (a) inside the <head> (b) inside a <li> (c) inside a <p> (d) inside a <tr>
  39. 39.Which of these is true of a web server? (a) opens web pages for us (b) shows pages from the web (c) sends pages over the net (d) shows line numbers
  40. 40.🌗 Is red on green easy or hard to read? (a) easy to read (b) hard to read

Answer key

  1. maths.html
  2. red
  3. <table>
  4. flex-start
  5. 3
  6. 45
  7. let
  8. <script>
  9. False
  10. opens it in a new tab
  11. Art corner
  12. 3
  13. weak
  14. red
  15. </h3>
  16. 3
  17. style.css
  18. <ol>
  19. True
  20. No
  21. #logo
  22. 80
  23. <ol>
  24. .big
  25. an id selector
  26. 3
  27. My pets
  28. False
  29. content
  30. picks the font style
  31. text-align
  32. <script src="script.js">
  33. 50
  34. turns HTML into a page
  35. 16
  36. black
  37. yellow
  38. inside a <tr>
  39. sends pages over the net
  40. hard to read

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