← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 752 · 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.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  2. 2.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) </h3> (c) <\h3> (d) <h3>
  3. 3.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <pic> (d) <img>
  4. 4.✍️ Which sign ends each CSS declaration? (a) , (b) : (c) . (d) ;
  5. 5.⚖️ Which selector is the strongest? (a) an element selector (b) an id selector (c) a class selector
  6. 6.🛡️ Online: is it safe to use a strong password? (a) safe (b) not safe
  7. 7.🔒 Is the connection to this address scrambled (encrypted)?
    https://kids.example.org/maths/tables.html
    (a) No (b) Yes
  8. 8.📱 Which tag helps phones show a page at the right size? (a) the br tag (b) the hr tag (c) the viewport meta tag (d) the title tag
  9. 9.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    <!-- <p>Rain today</p> -->
  10. 10.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 20px;
      }
    }
  11. 11.💪 Which flexbox property sets space between boxes? (a) display: flex (b) flex-direction (c) gap (d) justify-content
  12. 12.True or false: the content is the gap round content. (a) True (b) False
  13. 13.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  14. 14.🌈 Which colour is #00ff00? (a) red (b) blue (c) white (d) bright green
  15. 15.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h2> or <h3>? (a) <h2> (b) <h6> (c) <h3> (d) <h4>
  16. 16.🔍 Which line is missing its closing tag?
    line 1: <small>Cricket is fun.</small>
    line 2: <h1>My pets
    line 3: <strong>Our school trip</strong>
    (a) line 1 (b) line 3 (c) line 2
  17. 17.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the head (d) the doctype
  18. 18.🖌️ Which CSS property colours behind the text? (a) font-size (b) background-color (c) text-align (d) color
  19. 19.True or false: a web browser hosts websites online. (a) False (b) True
  20. 20.✍️ How many declarations (property: value pairs) are in this rule?
    .box {
      font-size: 20px;
      width: 300px;
      background-color: yellow;
      color: red;
    }
  21. 21.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Papaya</li>
    </ul>
  22. 22.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 300px;
      padding: 20px;
      border: 1px solid black;
      margin: 0px;
    }
  23. 23.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) blue (c) red (d) bright green
  24. 24.🌍 Which one asks for a web page? (a) the browser (b) the URL (c) the server (d) HTTPS
  25. 25.🎨 Which attribute adds CSS inside one tag? (a) src (b) alt (c) href (d) style
  26. 26.Which of these is an opening tag? (a) </h1> (b) <p> (c) </li> (d) </p>
  27. 27.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Litchi</td><td>Guava</td><td>Orange</td><td>Mango</td></tr>
      <tr><td>Litchi</td><td>Mango</td><td>Mango</td><td>Orange</td></tr>
    </table>
  28. 28.⚡ What number does this code print?
    let a = 21;
    let b = 10;
    console.log(a - b);
  29. 29.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  30. 30.💬 Does the browser show comments on the page? (a) Yes (b) No
  31. 31.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>Rain today</h2>
    <p>My best friend</p>
    <p>Hello, world!</p>
    <h2>My best friend</h2>
    <h2>My pets</h2>
  32. 32.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) height (c) alt (d) src
  33. 33.True or false: in <img>, alt sets how wide it is. (a) False (b) True
  34. 34.📛 In <a href="x.html">, what is href? (a) an element name (b) a closing tag (c) an attribute (d) a comment
  35. 35.✍️ In color: blue; which part is the property? (a) blue (b) color (c) : (d) ;
  36. 36.Which of these is the content? (a) space inside the border (b) the gap round content (c) space outside the border (d) the text or picture
  37. 37.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) hides the link (d) makes it bold
  38. 38.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 10; i = i + 4) {
      console.log(i);
    }
  39. 39.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <p> (d) <h1>
  40. 40.🔗 Which words do you click on?
    <a href="contact.html">Play games</a>
    (a) href (b) Play games (c) About us (d) contact.html

Answer key

  1. in the body
  2. </h3>
  3. <img>
  4. ;
  5. an id selector
  6. safe
  7. Yes
  8. the viewport meta tag
  9. 1
  10. 24
  11. gap
  12. False
  13. an opening tag
  14. bright green
  15. <h2>
  16. line 2
  17. the body
  18. background-color
  19. False
  20. 4
  21. 5
  22. 342
  23. blue
  24. the browser
  25. style
  26. <p>
  27. 3
  28. 11
  29. a closing tag
  30. No
  31. 3
  32. width
  33. False
  34. an attribute
  35. color
  36. the text or picture
  37. opens it in a new tab
  38. 8
  39. <h1>
  40. Play games

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