← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 420 · 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.✍️ What value is given to font-size in this rule?
    .box {
      margin: 10px;
      font-size: 20px;
      font-style: italic;
      font-weight: bold;
    }
    (a) yellow (b) font-size (c) 20px (d) center
  2. 2.True or false: <table> makes one table row. (a) True (b) False
  3. 3.🚀 Which file should this code go in: alert("Hi"); (a) script.js (b) index.html (c) style.css
  4. 4.Which of these does HTML do? (a) changes the page live (b) puts a picture on a page (c) adds space around boxes (d) sets colours and fonts
  5. 5.⚡ Which word makes a new variable? (a) put (b) give (c) make (d) let
  6. 6.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
  7. 7.🔗 Which address opens when you click this link?
    <a href="contact.html">Take the quiz</a>
    (a) https://example.com (b) maths.html (c) contact.html (d) Take the quiz
  8. 8.What does justify-content: flex-start do? (a) packs boxes at the end (b) equal gaps, none at ends (c) puts boxes in the middle (d) packs boxes at the start
  9. 9.♿ Does this help everyone, or make the page harder to use: write clear link text? (a) makes it harder (b) helps everyone
  10. 10.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  11. 11.What is <input type="text"> for? (a) picks a day (b) hides what you type (c) is for one line of words (d) lets you tick many
  12. 12.Which of these is a closing tag? (a) <p> (b) <h1> (c) <li> (d) </b>
  13. 13.🎯 Which CSS selector matches this element?
    <p class="star" id="top">Hello</p>
    (a) p (b) #intro (c) .top (d) #star
  14. 14.📱 The screen is 820px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 32px;
      }
    }
    (a) No (b) Yes
  15. 15.📊 Which tag gives the table a title? (a) <th> (b) <table> (c) <td> (d) <caption>
  16. 16.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) alt (c) width (d) src
  17. 17.What is <input type="checkbox"> for? (a) is for an email address (b) lets you tick many (c) hides what you type (d) lets you pick only one
  18. 18.⚖️ Which selector is the strongest? (a) an element selector (b) a class selector (c) an id selector
  19. 19.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <h6> (d) <p>
  20. 20.⚡ Which JavaScript word writes in the console? (a) for (b) alert() (c) console.log() (d) if
  21. 21.✍️ What value is given to font-weight in this rule?
    h2 {
      font-weight: bold;
      font-size: 20px;
      background-color: yellow;
      padding: 8px;
    }
    (a) 300px (b) bold (c) font-weight (d) 2px solid
  22. 22.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  23. 23.🛡️ Online: is it safe to log out on shared PCs? (a) not safe (b) safe
  24. 24.🎨 A CSS file usually ends with which extension? (a) .css (b) .png (c) .html (d) .js
  25. 25.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 9; i++) {
      total = total + i;
    }
    console.log(total);
  26. 26.Which of these goes in the body? (a) <title> (b) <p> (c) <style> (d) <meta charset="utf-8">
  27. 27.📦 In the box model, which part is the gap to other boxes? (a) padding (b) border (c) margin (d) content
  28. 28.🔍 Which line is missing its closing tag?
    line 1: <i>Cricket is fun.
    line 2: <strong>My pets</strong>
    line 3: <p>Good morning!</p>
    (a) line 1 (b) line 3 (c) line 2
  29. 29.🔤 In “HTML”, what does the L stand for? (a) Line (b) Language (c) Link (d) Laptop
  30. 30.Which of these is true of a code editor? (a) sends pages over the net (b) shows pages from the web (c) answers page requests (d) colours code to help us
  31. 31.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  32. 32.💪 Which justify-content value packs boxes at the start? (a) center (b) flex-start (c) flex-end (d) space-between
  33. 33.🎯 Which sign starts a class selector? (a) & (b) . (c) @ (d) #
  34. 34.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  35. 35.🌍 What is the protocol in this URL?
    http://school.example.in/about.html
    (a) https (b) http (c) school.example.in (d) /about.html
  36. 36.🧭 Is <article> semantic or not semantic? (a) not semantic (b) semantic
  37. 37.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) the first one (c) the later one (d) neither
  38. 38.True or false: .big is an element selector. (a) False (b) True
  39. 39.📊 Which tag makes one table row? (a) <th> (b) <tr> (c) <td> (d) <table>
  40. 40.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ul>

Answer key

  1. 20px
  2. False
  3. script.js
  4. puts a picture on a page
  5. let
  6. blue
  7. contact.html
  8. packs boxes at the start
  9. helps everyone
  10. in the head
  11. is for one line of words
  12. </b>
  13. p
  14. Yes
  15. <caption>
  16. height
  17. lets you tick many
  18. an id selector
  19. <h6>
  20. console.log()
  21. bold
  22. 3
  23. safe
  24. .css
  25. 45
  26. <p>
  27. margin
  28. line 1
  29. Language
  30. colours code to help us
  31. an opening tag
  32. flex-start
  33. .
  34. in the body
  35. http
  36. semantic
  37. the later one
  38. False
  39. <tr>
  40. 3

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