← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 48 · 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 tag gives a form box a name you can click? (a) <title> (b) <hr> (c) <h1> (d) <label>
  2. 2.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  3. 3.✍️ How many declarations (property: value pairs) are in this rule?
    .note {
      color: red;
      margin: 10px;
      border: 2px solid;
    }
  4. 4.⚖️ What colour is the text of this element?
    <p class="box" id="intro">Hi</p>
    CSS:
    p { color: yellow; }
    .box { color: orange; }
    (a) blue (b) yellow (c) orange (d) green
  5. 5.🖌️ Where does the text sit on its line?
    h2 {
      background-color: yellow;
      color: blue;
      text-align: left;
      font-size: 16px;
    }
    (a) on the left (b) on the right (c) in the middle
  6. 6.🔢 When you open a web page, which comes LAST? (a) the browser asks it (b) the server sends files (c) the browser shows it (d) you type the URL
  7. 7.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 180px;
      justify-content: flex-start;
    }
    Inside are 3 boxes, each 50px wide (no margins).
  8. 8.Which of these is true of a web browser? (a) shows line numbers (b) colours code to help us (c) opens web pages for us (d) is where we type code
  9. 9.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to colour it (c) to load it faster (d) to make it bigger
  10. 10.🌗 Is pink on red easy or hard to read? (a) hard to read (b) easy to read
  11. 11.📱 The screen is 375px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 22px;
      }
    }
    (a) No (b) Yes
  12. 12.📦 In the box model, which part is the gap round content? (a) padding (b) margin (c) content (d) border
  13. 13.📱 The screen is 700px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 22px;
      }
    }
    (a) Yes (b) No
  14. 14.Which of these goes in the head? (a) <img> (b) <p> (c) <ul> (d) <title>
  15. 15.📋 What number does the browser show next to “Grapes”?
    <ol start="6">
      <li>Guava</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
  16. 16.What is <input type="password"> for? (a) is for one line of words (b) is for an email address (c) hides what you type (d) picks a day
  17. 17.🖌️ What colour is behind the letters?
    h2 {
      color: yellow;
      font-size: 40px;
      text-align: left;
      background-color: purple;
    }
    (a) yellow (b) purple (c) green
  18. 18.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h2> or <h5>? (a) <h4> (b) <h2> (c) <h5> (d) <h6>
  19. 19.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="fruit"> Guava
      <input type="checkbox" name="fruit"> Papaya
      <input type="checkbox" name="fruit"> Banana
      <input type="checkbox" name="fruit"> Litchi
      <input type="checkbox" name="fruit"> Mango
    </form>
  20. 20.🔗 Which words do you click on?
    <a href="maths.html">School news</a>
    (a) School news (b) Take the quiz (c) maths.html (d) href
  21. 21.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Grapes</li>
    </ol>
    (a) numbers (b) bullets
  22. 22.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  23. 23.Which of these has a closing tag? (a) <input> (b) <hr> (c) <img> (d) <li>
  24. 24.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <body> (d) <head>
  25. 25.🧩 Which language changes the text size? (a) HTML (b) JavaScript (c) CSS
  26. 26.📱 Responsive design means a page ___. (a) fits every screen (b) is only for laptops (c) never changes (d) has no pictures
  27. 27.Which of these goes in the head? (a) <p> (b) <meta charset="utf-8"> (c) <h1> (d) <a>
  28. 28.Which of these is a closing tag? (a) </title> (b) <li> (c) <body> (d) <h1>
  29. 29.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="400">
    (a) cake.jpg (b) A red kite (c) kite.png (d) map.png
  30. 30.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  31. 31.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h2> or <h3>? (a) <h1> (b) <h5> (c) <h2> (d) <h3>
  32. 32.⚡ A JavaScript file usually ends with which extension? (a) .html (b) .jpg (c) .css (d) .js
  33. 33.🚀 Which file should this code go in: <ul><li>Art</li></ul> (a) index.html (b) style.css (c) script.js
  34. 34.True or false: in <img>, src tells which image to load. (a) True (b) False
  35. 35.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
  36. 36.🎨 Which tag connects an outside CSS file? (a) <css> (b) <a> (c) <img> (d) <link>
  37. 37.True or false: the border is space inside the border. (a) True (b) False
  38. 38.📦 In the box model, which part is space outside the border? (a) margin (b) padding (c) content (d) border
  39. 39.🔒 Is the connection to this address scrambled (encrypted)?
    https://www.example.com/news/today.html
    (a) Yes (b) No
  40. 40.🏷️ Which is the closing tag for <b>? (a) <b> (b) <b/> (c) <\b> (d) </b>

Answer key

  1. <label>
  2. No
  3. 3
  4. orange
  5. on the left
  6. the browser shows it
  7. 30
  8. opens web pages for us
  9. to describe the image
  10. hard to read
  11. No
  12. padding
  13. No
  14. <title>
  15. 7
  16. hides what you type
  17. purple
  18. <h6>
  19. 5
  20. School news
  21. numbers
  22. an opening tag
  23. <li>
  24. <!DOCTYPE html>
  25. CSS
  26. fits every screen
  27. <meta charset="utf-8">
  28. </title>
  29. kite.png
  30. a closing tag
  31. <h5>
  32. .js
  33. index.html
  34. True
  35. 3
  36. <link>
  37. False
  38. margin
  39. Yes
  40. </b>

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