← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 375 · 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.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as 5 spaces (c) as a dot (d) as a new line
  2. 2.🖌️ How big is the text, in px?
    h1 {
      font-size: 16px;
      background-color: yellow;
      color: red;
      text-align: center;
    }
  3. 3.🔍 Which is the odd one out? (a) colours code to help us (b) hosts websites online (c) shows line numbers (d) is where we type code
  4. 4.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 300px;
      padding: 20px;
      border: 1px solid black;
      margin: 5px;
    }
  5. 5.True or false: HTML counts down a timer. (a) True (b) False
  6. 6.🧩 Which language makes headings and lists? (a) HTML (b) CSS (c) JavaScript
  7. 7.🎯 Which element does the selector #logo style? (a) <div class="star"> (b) <li id="logo"> (c) <li class="logo"> (d) <li id="end">
  8. 8.🔗 Which words do you click on?
    <a href="news.html">About us</a>
    (a) Contact us (b) news.html (c) href (d) About us
  9. 9.🔍 Which line is missing its closing tag?
    line 1: <h3>Rain today
    line 2: <h2>Hello, world!</h2>
    line 3: <h1>My pets</h1>
    (a) line 1 (b) line 3 (c) line 2
  10. 10.🖌️ Where does the text sit on its line?
    h1 {
      text-align: right;
      font-size: 24px;
      color: red;
      background-color: purple;
    }
    (a) on the left (b) in the middle (c) on the right
  11. 11.What does color do? (a) makes the text bold (b) centres a heading (c) sets the letter colour (d) picks the font style
  12. 12.🌈 Which colour is #ffffff? (a) yellow (b) red (c) white (d) magenta
  13. 13.⚖️ What colour is the text of this element?
    <h2 class="menu" id="end">Hi</h2>
    CSS:
    .menu { color: white; }
    h2 { color: black; }
    (a) blue (b) white (c) orange (d) black
  14. 14.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 250px;
      justify-content: space-between;
    }
    Inside are 2 boxes, each 100px wide (no margins).
  15. 15.🌗 Is pink on red easy or hard to read? (a) hard to read (b) easy to read
  16. 16.✍️ What value is given to margin in this rule?
    h2 {
      color: red;
      padding: 8px;
      margin: 10px;
    }
    (a) bold (b) 10px (c) margin (d) 8px
  17. 17.🎯 Which sign starts an id selector? (a) . (b) @ (c) # (d) &
  18. 18.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  19. 19.🔢 When you open a web page, which comes LAST? (a) the browser asks it (b) the server sends files (c) the browser shows it (d) you type the URL
  20. 20.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) We won by 5 runs. (b) index.html (c) Class 7 Blog (d) Easy snacks
  21. 21.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h6>? (a) <h4> (b) <h6> (c) <h1> (d) <h5>
  22. 22.♿ Does this help everyone, or make the page harder to use: skipping heading levels? (a) helps everyone (b) makes it harder
  23. 23.What does font-weight do? (a) picks the font style (b) makes the text bold (c) colours behind the text (d) centres a heading
  24. 24.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ul> (d) <ol>
  25. 25.🔁 What does this code print?
    let marks = 25;
    if (marks >= 10) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Pass (b) Try again
  26. 26.🏷️ Every HTML tag starts with which sign? (a) < (b) ( (c) [ (d) {
  27. 27.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) hides the link (d) opens it in a new tab
  28. 28.🖌️ Where does the text sit on its line?
    h2 {
      background-color: red;
      text-align: right;
      font-size: 12px;
      color: white;
    }
    (a) on the left (b) in the middle (c) on the right
  29. 29.True or false: <input type="text"> is for one line of words. (a) True (b) False
  30. 30.🔗 Where does this link open?
    <a href="about.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  31. 31.🔁 What does this code print?
    let marks = 28;
    if (marks > 14) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Pass (b) Try again
  32. 32.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 230px;
      justify-content: flex-end;
    }
    Inside are 4 boxes, each 40px wide (no margins).
  33. 33.💪 Which flexbox property lines boxes up across? (a) align-items (b) justify-content (c) gap (d) flex-direction
  34. 34.🧩 Which language adds space around boxes? (a) HTML (b) JavaScript (c) CSS
  35. 35.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ol>
    (a) bullets (b) numbers
  36. 36.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h3> or <h2>? (a) <h4> (b) <h1> (c) <h3> (d) <h2>
  37. 37.🚀 Which file is best for the colours and fonts? (a) style.css (b) photo.jpg (c) script.js (d) index.html
  38. 38.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>
  39. 39.📋 What number does the browser show next to “Litchi”?
    <ol start="2">
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Banana</li>
    </ol>
  40. 40.True or false: JavaScript shows a pop-up message. (a) True (b) False

Answer key

  1. as one space
  2. 16
  3. hosts websites online
  4. 342
  5. False
  6. HTML
  7. <li id="logo">
  8. About us
  9. line 1
  10. on the right
  11. sets the letter colour
  12. white
  13. white
  14. 50
  15. hard to read
  16. 10px
  17. #
  18. in the head
  19. the browser shows it
  20. Class 7 Blog
  21. <h1>
  22. makes it harder
  23. makes the text bold
  24. <ol>
  25. Pass
  26. <
  27. opens it in a new tab
  28. on the right
  29. True
  30. in a new tab
  31. Pass
  32. 70
  33. align-items
  34. CSS
  35. numbers
  36. <h1>
  37. style.css
  38. <ol>
  39. 3
  40. True

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