← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 970 · 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.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="colour"> Green
      <input type="checkbox" name="colour"> Red
      <input type="checkbox" name="colour"> Pink
    </form>
  2. 2.🧩 Which language checks a quiz answer? (a) JavaScript (b) HTML (c) CSS
  3. 3.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 22px;
      }
    }
  4. 4.📝 What does <hr> draw? (a) a table (b) a line across the page (c) a link (d) a picture
  5. 5.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
  6. 6.♿ Who uses a screen reader? (a) people who are blind (b) only coders (c) only robots (d) only teachers
  7. 7.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  8. 8.True or false: <ul> goes in the body. (a) False (b) True
  9. 9.What does font-weight do? (a) makes the text bold (b) centres a heading (c) colours behind the text (d) sets the letter colour
  10. 10.⚖️ What colour is the text of this element?
    <p class="red" id="main">Hi</p>
    CSS:
    .red { color: orange; }
    p { color: black; }
    #main { color: green; }
    (a) yellow (b) orange (c) black (d) green
  11. 11.Which of these is true of a code editor? (a) turns HTML into a page (b) shows pages from the web (c) shows line numbers (d) hosts websites online
  12. 12.✍️ In color: blue; which part is the property? (a) ; (b) color (c) blue (d) :
  13. 13.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h1>? (a) <h4> (b) <h6> (c) <h1> (d) <h3>
  14. 14.🔗 Which attribute holds the address of a link? (a) src (b) id (c) alt (d) href
  15. 15.♿ Does this help everyone, or make the page harder to use: label every form box? (a) helps everyone (b) makes it harder
  16. 16.🔍 Which is the odd one out? (a) checks a quiz answer (b) lays out the page (c) reacts to a button click (d) changes the page live
  17. 17.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) My drawings (b) index.html (c) We won by 5 runs. (d) Riya’s Recipes
  18. 18.♿ A part of the page is under a <h1> heading. Which tag should its sub-heading use? (a) <h6> (b) <h1> (c) <h3> (d) <h2>
  19. 19.✍️ How many declarations (property: value pairs) are in this rule?
    li {
      font-size: 20px;
      padding: 8px;
    }
  20. 20.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h1> or <h6>? (a) <h2> (b) <h1> (c) <h6> (d) <h3>
  21. 21.📱 The screen is 1100px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 20px;
      }
    }
    (a) Yes (b) No
  22. 22.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <head> (d) <!DOCTYPE html>
  23. 23.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <body> (c) <head> (d) <!DOCTYPE html>
  24. 24.✍️ Which sign ends each CSS declaration? (a) . (b) , (c) ; (d) :
  25. 25.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow<br>Stars shine<br>Kites fly high</p>
  26. 26.🔁 What does this code print?
    let age = 21;
    if (age >= 16) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) child (b) teen
  27. 27.💪 Which justify-content value puts boxes in the middle? (a) flex-start (b) flex-end (c) space-between (d) center
  28. 28.🔢 On a typical page, from top to bottom, what comes right after “<nav>”? (a) <footer> (b) <main> (c) <header>
  29. 29.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 80px;
      padding: 5px;
      border: 4px solid black;
      margin: 5px;
    }
  30. 30.⚡ What does this code show?
    let name = "Riya";
    alert("Hello, " + name + "!");
    (a) Riya (b) Hello, Riya! (c) Hello, name! (d) name
  31. 31.🖌️ What colour is behind the letters?
    h1 {
      color: orange;
      background-color: black;
      text-align: right;
      font-size: 40px;
    }
    (a) orange (b) black (c) purple
  32. 32.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="colour"> Pink
      <input type="radio" name="colour"> Orange
      <input type="radio" name="colour"> Red
    </form>
  33. 33.⚖️ What colour is the text of this element?
    <h1 class="note" id="logo">Hi</h1>
    CSS:
    .note { color: orange; }
    .note { color: black; }
    (a) orange (b) purple (c) yellow (d) black
  34. 34.✍️ Which property is set to 8px in this rule?
    body {
      color: red;
      padding: 8px;
    }
    (a) 8px (b) border (c) font-weight (d) padding
  35. 35.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 180px;
      justify-content: space-between;
    }
    Inside are 2 boxes, each 80px wide (no margins).
  36. 36.Which of these is true of a web browser? (a) has an address bar (b) stores a website’s files (c) hosts websites online (d) is where we type code
  37. 37.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Jamun</li>
    </ul>
    (a) numbers (b) bullets
  38. 38.🖌️ What colour is behind the letters?
    h2 {
      color: green;
      text-align: right;
      background-color: black;
      font-size: 16px;
    }
    (a) purple (b) black (c) green
  39. 39.🔗 Where does this link open?
    <a href="about.html">Visit the site</a>
    (a) in the same tab (b) in a new tab
  40. 40.🎨 Which attribute adds CSS inside one tag? (a) style (b) alt (c) src (d) href

Answer key

  1. 3
  2. JavaScript
  3. 24
  4. a line across the page
  5. on the browser tab
  6. people who are blind
  7. in the head
  8. True
  9. makes the text bold
  10. green
  11. shows line numbers
  12. color
  13. <h6>
  14. href
  15. helps everyone
  16. lays out the page
  17. Riya’s Recipes
  18. <h2>
  19. 2
  20. <h6>
  21. Yes
  22. <!DOCTYPE html>
  23. </html>
  24. ;
  25. 4
  26. teen
  27. center
  28. <main>
  29. 108
  30. Hello, Riya!
  31. black
  32. 1
  33. black
  34. padding
  35. 20
  36. has an address bar
  37. bullets
  38. black
  39. in the same tab
  40. style

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