← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 828 · 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) a class selector (b) an id selector (c) an element selector
  2. 2.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <img> (d) <link>
  3. 3.✍️ CSS declarations go inside which brackets? (a) [ ] (b) < > (c) ( ) (d) { }
  4. 4.True or false: <title> goes in the head. (a) True (b) False
  5. 5.True or false: “link text “click here”” makes the page harder to use. (a) True (b) False
  6. 6.True or false: to put secrets in comments is not safe. (a) False (b) True
  7. 7.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  8. 8.⚖️ What colour is the text of this element?
    <h1 class="menu" id="end">Hi</h1>
    CSS:
    h1 { color: green; }
    .menu { color: blue; }
    (a) green (b) black (c) purple (d) blue
  9. 9.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
    <!-- <p>Our school trip</p> -->
    <!-- <p>My best friend</p> -->
  10. 10.🔒 Is the connection to this address scrambled (encrypted)?
    https://kids.example.org/games/chess.html
    (a) No (b) Yes
  11. 11.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
  12. 12.✍️ What value is given to width in this rule?
    li {
      font-weight: bold;
      color: red;
      width: 300px;
      font-size: 20px;
    }
    (a) width (b) 300px (c) italic (d) red
  13. 13.🔁 What does this code print?
    let temp = 11;
    if (temp > 20) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Hot (b) Cool
  14. 14.⚖️ What colour is the text of this element?
    <p class="box" id="logo">Hi</p>
    CSS:
    #logo { color: purple; }
    p { color: yellow; }
    .box { color: black; }
    (a) purple (b) black (c) yellow (d) green
  15. 15.📊 How many rows does this table have?
    <table>
      <tr><td>Jamun</td><td>Grapes</td></tr>
      <tr><td>Mango</td><td>Litchi</td></tr>
      <tr><td>Guava</td><td>Orange</td></tr>
      <tr><td>Grapes</td><td>Mango</td></tr>
    </table>
  16. 16.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
  17. 17.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
  18. 18.💬 How does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
  19. 19.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Grapes</td><td>Litchi</td></tr>
    </table>
  20. 20.🔠 Are headings shown in bold by default? (a) Yes (b) No
  21. 21.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
  22. 22.🏷️ Which is the closing tag for <strong>? (a) <\strong> (b) <strong> (c) </strong> (d) <strong/>
  23. 23.📋 What number does the browser show next to “Jamun”?
    <ol start="4">
      <li>Guava</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ol>
  24. 24.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 40px;
      padding: 10px;
      border: 4px solid black;
      margin: 0px;
    }
  25. 25.🔗 Where does this link open?
    <a href="contact.html">Maths fun</a>
    (a) in the same tab (b) in a new tab
  26. 26.True or false: <caption> makes one data cell. (a) False (b) True
  27. 27.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  28. 28.🎯 Which CSS selector matches this element?
    <span class="menu" id="hero">Hello</span>
    (a) p (b) .menu (c) .hero (d) #menu
  29. 29.✍️ What value is given to background-color in this rule?
    .note {
      color: red;
      background-color: yellow;
    }
    (a) 10px (b) yellow (c) 8px (d) background-color
  30. 30.🌍 What is the protocol in this URL?
    https://www.example.com/about.html
    (a) www.example.com (b) http (c) https (d) /about.html
  31. 31.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) the first one (c) neither (d) the later one
  32. 32.🔁 Which loop repeats code a set number of times? (a) else (b) if (c) let (d) for
  33. 33.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
    (a) kite.png (b) tiger.jpg (c) map.png (d) A tiger asleep
  34. 34.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 16px;
      }
    }
  35. 35.🔍 Which is the odd one out? (a) turns HTML into a page (b) opens web pages for us (c) colours code to help us (d) shows pages from the web
  36. 36.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 280px;
      padding: 15px;
      border: 1px solid black;
      margin: 15px;
    }
  37. 37.🧭 Is <footer> semantic or not semantic? (a) not semantic (b) semantic
  38. 38.⚖️ What colour is the text of this element?
    <h2 class="menu" id="main">Hi</h2>
    CSS:
    .menu { color: orange; }
    h2 { color: black; }
    (a) orange (b) purple (c) black (d) red
  39. 39.🌈 In #00004a the blue part is the hex number 4a. What is it as a normal number?
  40. 40.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 20px;
      }
    }

Answer key

  1. an element selector
  2. <a>
  3. { }
  4. True
  5. True
  6. True
  7. a closing tag
  8. blue
  9. 2
  10. Yes
  11. Yes
  12. 300px
  13. Cool
  14. purple
  15. 4
  16. 4
  17. a web browser
  18. <!--
  19. 2
  20. Yes
  21. 400
  22. </strong>
  23. 6
  24. 68
  25. in the same tab
  26. False
  27. an opening tag
  28. .menu
  29. yellow
  30. https
  31. the later one
  32. for
  33. tiger.jpg
  34. 16
  35. colours code to help us
  36. 312
  37. semantic
  38. orange
  39. 74
  40. 20

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