← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 494 · 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.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) black (d) blue
  2. 2.⚖️ What colour is the text of this element?
    <h2 class="star" id="top">Hi</h2>
    CSS:
    .star { color: red; }
    .star { color: blue; }
    (a) white (b) red (c) orange (d) blue
  3. 3.✍️ How does a CSS comment start? (a) // (b) /* (c) # (d) <!--
  4. 4.Which colour pair is easy to read? (a) red on green (b) yellow on white (c) white on black (d) pink on red
  5. 5.🔁 What does this code print?
    let score = 35;
    if (score >= 34) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) Play again (b) You win
  6. 6.🌐 Which one hosts websites online? (a) a web server (b) a web browser (c) a code editor
  7. 7.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Litchi</td><td>Guava</td><td>Guava</td></tr>
      <tr><td>Grapes</td><td>Mango</td><td>Banana</td></tr>
      <tr><td>Papaya</td><td>Banana</td><td>Jamun</td></tr>
    </table>
  8. 8.True or false: the content is a solid or dotted edge. (a) True (b) False
  9. 9.📊 Which tag makes one table row? (a) <table> (b) <td> (c) <caption> (d) <tr>
  10. 10.🔗 Which address opens when you click this link?
    <a href="about.html">Play games</a>
    (a) contact.html (b) about.html (c) Play games (d) https://example.com
  11. 11.🔗 Where does this link open?
    <a href="games.html" target="_blank">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  12. 12.🔢 When you open a web page, what comes right after “DNS finds the server”? (a) the browser asks it (b) the browser shows it (c) the server sends files (d) you type the URL
  13. 13.🔁 How many times does this code print “Well done”?
    for (let i = 1; i < 4; i++) {
      console.log("Well done");
    }
  14. 14.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 24px;
      }
    }
  15. 15.🔗 Where does this link open?
    <a href="news.html" target="_blank">About us</a>
    (a) in a new tab (b) in the same tab
  16. 16.📦 In the box model, which part is space inside the border? (a) padding (b) border (c) content (d) margin
  17. 17.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Banana</li>
    </ol>
  18. 18.True or false: the border is space inside the border. (a) True (b) False
  19. 19.✍️ In color: blue; which part is the property? (a) color (b) blue (c) ; (d) :
  20. 20.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  21. 21.🔍 One closing tag is missing. Which one?
    <p>Good morning!</p>
    <b>My best friend
    <i>My pets</i>
    (a) </p> (b) </i> (c) </h2> (d) </b>
  22. 22.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->
    (a) My best friend (b) Good morning! (c) Our school trip
  23. 23.📊 Which tag gives the table a title? (a) <caption> (b) <table> (c) <tr> (d) <th>
  24. 24.💪 Which flexbox property spaces boxes along a row? (a) flex-direction (b) gap (c) justify-content (d) align-items
  25. 25.🔍 Which line is missing its closing tag?
    line 1: <b>My best friend</b>
    line 2: <small>My pets</small>
    line 3: <u>Good morning!
    (a) line 3 (b) line 2 (c) line 1
  26. 26.Which colour pair is hard to read? (a) blue on purple (b) white on dark blue (c) yellow on black (d) dark grey on white
  27. 27.📋 What number does the browser show next to “Papaya”?
    <ol start="7">
      <li>Guava</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Grapes</li>
    </ol>
  28. 28.📊 How many rows does this table have?
    <table>
      <tr><td>Litchi</td><td>Grapes</td><td>Banana</td><td>Banana</td></tr>
      <tr><td>Guava</td><td>Grapes</td><td>Orange</td><td>Guava</td></tr>
    </table>
  29. 29.🌗 Is yellow on black easy or hard to read? (a) hard to read (b) easy to read
  30. 30.🔍 Which is the odd one out? (a) has an address bar (b) shows line numbers (c) opens web pages for us (d) shows pages from the web
  31. 31.Which of these is not safe to do online? (a) log out on shared PCs (b) tell a trusted adult (c) share your OTP (d) use a nickname in games
  32. 32.🔗 Which words do you click on?
    <a href="https://example.com">Take the quiz</a>
    (a) href (b) Take the quiz (c) Play games (d) https://example.com
  33. 33.🎯 Which element does the selector p style? (a) <h2 class="note"> (b) <p class="note"> (c) <li id="top"> (d) <h1>
  34. 34.🧭 Why use <nav> instead of <div> for a menu? (a) it tells its meaning (b) it makes text red (c) it adds pictures (d) it loads faster
  35. 35.Which of these is safe to do online? (a) share your password (b) click prize links (c) share your OTP (d) think before you post
  36. 36.🚀 Where in index.html does the link to style.css go? (a) after </html> (b) inside a <p> (c) in the head (d) in the footer
  37. 37.True or false: in <img>, alt names the picture file. (a) False (b) True
  38. 38.Which of these is the content? (a) the gap round content (b) space outside the border (c) space inside the border (d) the text or picture
  39. 39.🌍 What is the protocol in this URL?
    http://learn.example.com/art/gallery.html
    (a) https (b) /art/gallery.html (c) http (d) learn.example.com
  40. 40.What does font-family do? (a) makes letters bigger (b) picks the font style (c) centres a heading (d) colours behind the text

Answer key

  1. red
  2. blue
  3. /*
  4. white on black
  5. You win
  6. a web server
  7. 12
  8. False
  9. <tr>
  10. about.html
  11. in a new tab
  12. the browser asks it
  13. 3
  14. 24
  15. in a new tab
  16. padding
  17. 3
  18. False
  19. color
  20. has a closing tag
  21. </b>
  22. Good morning!
  23. <caption>
  24. justify-content
  25. line 3
  26. blue on purple
  27. 9
  28. 2
  29. easy to read
  30. shows line numbers
  31. share your OTP
  32. Take the quiz
  33. <p class="note">
  34. it tells its meaning
  35. think before you post
  36. in the head
  37. False
  38. the text or picture
  39. http
  40. picks the font style

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