← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 112 · 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 does alert() show? (a) a pop-up box (b) a table (c) a new tab (d) a picture
  2. 2.🔗 Where does this link open?
    <a href="about.html">Art corner</a>
    (a) in a new tab (b) in the same tab
  3. 3.What does font-weight do? (a) sets the letter colour (b) makes letters bigger (c) makes the text bold (d) picks the font style
  4. 4.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
  5. 5.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h2> or <h6>? (a) <h6> (b) <h1> (c) <h2> (d) <h3>
  6. 6.Which of these is not safe to do online? (a) tell a trusted adult (b) use a strong password (c) share your password (d) keep passwords secret
  7. 7.📦 In the box model, which part is the gap to other boxes? (a) border (b) margin (c) content (d) padding
  8. 8.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  9. 9.🌈 Which hex code is red? (a) #ff00ff (b) #000000 (c) #ff0000 (d) #ffff00
  10. 10.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h4>Rain today</h4>
    <h2>I love mangoes.</h2>
    <p>My best friend</p>
    <p>Fun facts</p>
  11. 11.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h3> or <h5>? (a) <h2> (b) <h3> (c) <h6> (d) <h5>
  12. 12.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
  13. 13.🔁 When does the else part run? (a) never (b) when if is true (c) when if is false (d) always
  14. 14.🔗 Which words do you click on?
    <a href="quiz.html">School news</a>
    (a) quiz.html (b) School news (c) Take the quiz (d) href
  15. 15.🔢 In a basic web page file, which comes LAST? (a) </head> (b) <head> (c) </html> (d) <body>
  16. 16.🎯 Which element does the selector .star style? (a) <h1 class="note"> (b) <p class="star"> (c) <p id="star"> (d) <p class="menu">
  17. 17.🖌️ Which CSS property picks the font style? (a) background-color (b) font-family (c) font-weight (d) font-size
  18. 18.🌈 Which colour is #ff0000? (a) red (b) cyan (c) white (d) bright green
  19. 19.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Visit the site</a>
    (a) in the same tab (b) in a new tab
  20. 20.Which of these is true of <article>? (a) holds the logo and title (b) holds a news story (c) holds a side box of tips (d) holds extra side notes
  21. 21.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
  22. 22.🔢 To build and share your first web page, what comes right after “test in a browser”? (a) plan what to show (b) add CSS styles (c) publish it online (d) write the HTML
  23. 23.🖌️ Which CSS property makes letters bigger? (a) background-color (b) color (c) font-size (d) font-family
  24. 24.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  25. 25.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Good morning!</p>
    <p>My pets</p>
    <h2>I love mangoes.</h2>
  26. 26.What is <input type="number"> for? (a) picks a day (b) lets you tick many (c) hides what you type (d) takes only numbers
  27. 27.🧭 Which semantic tag holds one blog post? (a) <footer> (b) <main> (c) <article> (d) <header>
  28. 28.Which of these is a strong password? (a) password (b) 123456 (c) Mango#Kite29! (d) abcd1234
  29. 29.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="sport"> Kabaddi
      <input type="checkbox" name="sport"> Cricket
      <input type="checkbox" name="sport"> Football
    </form>
  30. 30.📋 Does this list show bullets or numbers?
    <ol>
      <li>Litchi</li>
      <li>Jamun</li>
    </ol>
    (a) numbers (b) bullets
  31. 31.📝 Which input type takes only numbers? (a) text (b) password (c) number (d) checkbox
  32. 32.⚡ What number does this code print?
    let marks = 13;
    marks = marks + 7;
    marks = marks - 14;
    console.log(marks);
  33. 33.True or false: .note is a class selector. (a) False (b) True
  34. 34.🔗 Which words do you click on?
    <a href="art.html">Take the quiz</a>
    (a) Play games (b) href (c) art.html (d) Take the quiz
  35. 35.Which of these is a weak password? (a) 123456 (b) Kite_Fl1es@Dawn (c) Chai$Cup_19x (d) Rain#Drop_42!
  36. 36.🖌️ How big is the text, in px?
    li {
      font-size: 12px;
      color: purple;
      background-color: red;
      text-align: left;
    }
  37. 37.🚀 Which file should this code go in: .box { padding: 8px; } (a) style.css (b) index.html (c) script.js
  38. 38.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 20px;
      }
    }
  39. 39.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 220px;
      justify-content: flex-end;
    }
    Inside are 4 boxes, each 40px wide (no margins).
  40. 40.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h3>Hello, world!</h3>
    <h2>Rain today</h2>
    <h2>My best friend</h2>
    <p>My pets</p>

Answer key

  1. a pop-up box
  2. in the same tab
  3. makes the text bold
  4. href
  5. <h6>
  6. share your password
  7. margin
  8. No
  9. #ff0000
  10. 3
  11. <h6>
  12. 255
  13. when if is false
  14. School news
  15. </html>
  16. <p class="star">
  17. font-family
  18. red
  19. in a new tab
  20. holds a news story
  21. False
  22. publish it online
  23. font-size
  24. has a closing tag
  25. 2
  26. takes only numbers
  27. <article>
  28. Mango#Kite29!
  29. 3
  30. numbers
  31. number
  32. 6
  33. True
  34. Take the quiz
  35. 123456
  36. 12
  37. style.css
  38. 20
  39. 60
  40. 4

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