← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 56 · 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 heading shows the BIGGEST text: <h5>, <h6>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h6> (d) <h5>
  2. 2.True or false: <caption> gives the table a title. (a) False (b) True
  3. 3.True or false: to log out on shared PCs is safe. (a) True (b) False
  4. 4.🔍 Which is the odd one out? (a) colours code to help us (b) stores a website’s files (c) sends pages over the net (d) answers page requests
  5. 5.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <body> (d) <head>
  6. 6.🔁 How many times does this code print “Welcome”?
    for (let i = 2; i < 5; i++) {
      console.log("Welcome");
    }
  7. 7.🧩 Which language puts a picture on a page? (a) CSS (b) JavaScript (c) HTML
  8. 8.True or false: <b> is an empty tag. (a) True (b) False
  9. 9.🌍 What is the protocol in this URL?
    https://www.example.com/news/today.html
    (a) /news/today.html (b) https (c) www.example.com (d) http
  10. 10.True or false: margin is the gap to other boxes. (a) False (b) True
  11. 11.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) red (d) white
  12. 12.True or false: console.log(5 + 2); goes in index.html. (a) False (b) True
  13. 13.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <p>Good morning!</p>
    <p>My best friend</p>
    <!-- <p>Rain today</p> -->
  14. 14.🔍 Which is the odd one out? (a) shows a pop-up message (b) lays out the page (c) counts down a timer (d) reacts to a button click
  15. 15.Which of these is padding? (a) a solid or dotted edge (b) the line round the box (c) space outside the border (d) the gap round content
  16. 16.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h4>? (a) <h5> (b) <h4> (c) <h3> (d) <h1>
  17. 17.⚡ Which JavaScript word writes in the console? (a) let (b) if (c) console.log() (d) for
  18. 18.True or false: <img> goes in the head. (a) True (b) False
  19. 19.⚖️ What colour is the text of this element?
    <h2 class="star" id="intro">Hi</h2>
    CSS:
    h2 { color: green; }
    h2 { color: black; }
    (a) blue (b) orange (c) green (d) black
  20. 20.True or false: a code editor shows line numbers. (a) True (b) False
  21. 21.📱 The screen is 820px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 28px;
      }
    }
    (a) Yes (b) No
  22. 22.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow</p>
  23. 23.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) black (c) blue (d) cyan
  24. 24.What does background-color do? (a) sets the letter colour (b) picks the font style (c) centres a heading (d) colours behind the text
  25. 25.⚖️ Which selector is the weakest? (a) an element selector (b) a class selector (c) an id selector
  26. 26.🎯 Which sign starts a class selector? (a) . (b) & (c) # (d) @
  27. 27.🔗 Which address opens when you click this link?
    <a href="games.html">About us</a>
    (a) contact.html (b) games.html (c) About us (d) about.html
  28. 28.🔍 Which is the odd one out? (a) makes a link (b) gives the page structure (c) makes headings and lists (d) counts down a timer
  29. 29.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 130px;
      padding: 10px;
      border: 2px solid black;
      margin: 20px;
    }
  30. 30.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ul>
  31. 31.✍️ In color: blue; which part is the property? (a) blue (b) color (c) : (d) ;
  32. 32.🔐 Is abcd1234 a strong or a weak password? (a) strong (b) weak
  33. 33.True or false: HTML on its own can count button clicks. (a) True (b) False
  34. 34.🔗 Where does this link open?
    <a href="quiz.html">About us</a>
    (a) in a new tab (b) in the same tab
  35. 35.🖌️ What colour is behind the letters?
    h1 {
      text-align: right;
      background-color: blue;
      font-size: 20px;
      color: green;
    }
    (a) black (b) blue (c) green
  36. 36.🔁 What does this code print?
    let marks = 19;
    if (marks > 12) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Pass (b) Try again
  37. 37.Which of these has a closing tag? (a) <input> (b) <br> (c) <img> (d) <title>
  38. 38.🔗 Where does this link open?
    <a href="contact.html">Visit the site</a>
    (a) in the same tab (b) in a new tab
  39. 39.🔍 Which line is missing its closing tag?
    line 1: <p>My pets</p>
    line 2: <b>My best friend</b>
    line 3: <h1>I love mangoes.
    (a) line 1 (b) line 3 (c) line 2
  40. 40.🔗 Where does this link open?
    <a href="art.html">Maths fun</a>
    (a) in a new tab (b) in the same tab

Answer key

  1. <h3>
  2. True
  3. True
  4. colours code to help us
  5. <!DOCTYPE html>
  6. 3
  7. HTML
  8. False
  9. https
  10. True
  11. blue
  12. False
  13. 3
  14. lays out the page
  15. the gap round content
  16. <h1>
  17. console.log()
  18. False
  19. black
  20. True
  21. No
  22. 2
  23. cyan
  24. colours behind the text
  25. an element selector
  26. .
  27. games.html
  28. counts down a timer
  29. 154
  30. 5
  31. color
  32. weak
  33. False
  34. in the same tab
  35. blue
  36. Pass
  37. <title>
  38. in the same tab
  39. line 3
  40. in the same tab

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