← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 81 · 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 of these is an opening tag? (a) </title> (b) <li> (c) </p> (d) </h1>
  2. 2.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 230px;
      padding: 10px;
      border: 4px solid black;
      margin: 5px;
    }
  3. 3.♿ Does this help everyone, or make the page harder to use: colour as the only clue? (a) makes it harder (b) helps everyone
  4. 4.📦 In the box model, which part is the gap to other boxes? (a) margin (b) padding (c) border (d) content
  5. 5.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ul>
  6. 6.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Kites fly high<br>Birds sing<br>Rivers flow</p>
  7. 7.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) <h3/> (c) <h3> (d) </h3>
  8. 8.✍️ Which property is set to 20px in this rule?
    #top {
      width: 300px;
      font-size: 20px;
    }
    (a) background-color (b) 20px (c) font-size (d) text-align
  9. 9.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 130px;
      padding: 20px;
      border: 5px solid black;
      margin: 5px;
    }
  10. 10.♿ A part of the page is under a <h3> heading. Which tag should its sub-heading use? (a) <h1> (b) <h4> (c) <h3> (d) <h6>
  11. 11.🎯 Which CSS selector matches this element?
    <span class="red" id="hero">Hello</span>
    (a) #hero (b) .hero (c) p (d) #top
  12. 12.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) in a big heading (d) on the browser tab
  13. 13.🎨 Which tag connects an outside CSS file? (a) <a> (b) <link> (c) <img> (d) <css>
  14. 14.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <html> (d) <head>
  15. 15.True or false: <b> has a closing tag. (a) False (b) True
  16. 16.🖌️ Which CSS property colours behind the text? (a) font-weight (b) font-size (c) background-color (d) font-family
  17. 17.📦 In the box model, which part is the line round the box? (a) margin (b) padding (c) content (d) border
  18. 18.🖌️ What colour is behind the letters?
    li {
      color: purple;
      background-color: white;
      font-size: 32px;
      text-align: right;
    }
    (a) white (b) blue (c) purple
  19. 19.📊 Which tag makes one table row? (a) <th> (b) <td> (c) <tr> (d) <caption>
  20. 20.🔁 How many numbers does this code print?
    for (let i = 0; i < 17; i = i + 4) {
      console.log(i);
    }
  21. 21.🔐 Is 123456 a strong or a weak password? (a) strong (b) weak
  22. 22.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Guava</li>
    </ul>
  23. 23.📱 Which tag helps phones show a page at the right size? (a) the viewport meta tag (b) the title tag (c) the br tag (d) the hr tag
  24. 24.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
    <p>Rain today</p>
    (a) Fun facts (b) Hello, world! (c) Rain today (d) Our school trip
  25. 25.📝 What does <hr> draw? (a) a line across the page (b) a link (c) a table (d) a picture
  26. 26.📝 Which tag holds a whole form? (a) <ol> (b) <input> (c) <form> (d) <table>
  27. 27.🌗 Is white on black easy or hard to read? (a) easy to read (b) hard to read
  28. 28.🌈 In #0000b5 the blue part is the hex number b5. What is it as a normal number?
  29. 29.True or false: “use headings in order” helps everyone use the page. (a) True (b) False
  30. 30.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>Our school trip</p> -->
    <!-- <p>My pets</p> -->
  31. 31.⚖️ What colour is the text of this element?
    <p class="red" id="top">Hi</p>
    CSS:
    #top { color: green; }
    #top { color: purple; }
    (a) red (b) green (c) purple (d) white
  32. 32.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Roses are red<br>Sky is blue</p>
  33. 33.💪 Which flexbox property sets space between boxes? (a) gap (b) justify-content (c) display: flex (d) align-items
  34. 34.🖌️ Where does the text sit on its line?
    h1 {
      text-align: center;
      color: red;
      font-size: 28px;
      background-color: green;
    }
    (a) in the middle (b) on the left (c) on the right
  35. 35.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) width (c) height (d) alt
  36. 36.⚖️ What colour is the text of this element?
    <h1 class="box" id="intro">Hi</h1>
    CSS:
    h1 { color: black; }
    h1 { color: blue; }
    (a) blue (b) green (c) orange (d) black
  37. 37.🔍 Which is the odd one out? (a) sends pages over the net (b) hosts websites online (c) turns HTML into a page (d) answers page requests
  38. 38.🌈 Which hex code is cyan? (a) #000000 (b) #00ffff (c) #ffff00 (d) #0000ff
  39. 39.✍️ CSS declarations go inside which brackets? (a) ( ) (b) { } (c) [ ] (d) < >
  40. 40.🌍 What is the protocol in this URL?
    https://www.example.com/art/gallery.html
    (a) http (b) www.example.com (c) https (d) /art/gallery.html

Answer key

  1. <li>
  2. 268
  3. makes it harder
  4. margin
  5. 3
  6. 4
  7. </h3>
  8. font-size
  9. 190
  10. <h4>
  11. #hero
  12. on the browser tab
  13. <link>
  14. <!DOCTYPE html>
  15. True
  16. background-color
  17. border
  18. white
  19. <tr>
  20. 5
  21. weak
  22. 6
  23. the viewport meta tag
  24. Our school trip
  25. a line across the page
  26. <form>
  27. easy to read
  28. 181
  29. True
  30. 1
  31. purple
  32. 3
  33. gap
  34. in the middle
  35. height
  36. blue
  37. turns HTML into a page
  38. #00ffff
  39. { }
  40. https

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