← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 377 · 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.🔠 Are headings shown in bold by default? (a) Yes (b) No
  2. 2.⚡ What number does this code print?
    let score = 5;
    score = score + 16;
    score = score - 10;
    console.log(score);
  3. 3.True or false: alert(score); goes in style.css. (a) False (b) True
  4. 4.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
  5. 5.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  6. 6.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>My pets</h2>
    <h2>Fun facts</h2>
    <p>Good morning!</p>
    <h2>My best friend</h2>
  7. 7.🔗 Where does this link open?
    <a href="quiz.html">School news</a>
    (a) in the same tab (b) in a new tab
  8. 8.📄 What is the first line of an HTML5 page? (a) <head> (b) <!DOCTYPE html> (c) <html> (d) <body>
  9. 9.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="400">
    (a) map.png (b) A red kite (c) cake.jpg (d) kite.png
  10. 10.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
  11. 11.Which of these is not safe to do online? (a) use a strong password (b) think before you post (c) type a password on http (d) keep passwords secret
  12. 12.🌈 Which hex code is white? (a) #ffffff (b) #00ff00 (c) #ff00ff (d) #ff0000
  13. 13.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Sky is blue<br>Kites fly high</p>
  14. 14.⚡ What number does this code print?
    let a = 56;
    let b = 23;
    console.log(a - b);
  15. 15.📝 Which tag holds a whole form? (a) <ol> (b) <table> (c) <input> (d) <form>
  16. 16.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>Rain today</p>
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
  17. 17.🔁 When does the else part run? (a) when if is true (b) never (c) when if is false (d) always
  18. 18.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Orange</td><td>Papaya</td><td>Orange</td><td>Grapes</td></tr>
      <tr><td>Grapes</td><td>Orange</td><td>Litchi</td><td>Jamun</td></tr>
      <tr><td>Banana</td><td>Litchi</td><td>Litchi</td><td>Banana</td></tr>
    </table>
  19. 19.🌗 Is black on white easy or hard to read? (a) hard to read (b) easy to read
  20. 20.True or false: <main> holds extra side notes. (a) False (b) True
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
  22. 22.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 22px;
      }
    }
  23. 23.Which of these is an empty tag? (a) <br> (b) <ul> (c) <h1> (d) <li>
  24. 24.🔢 On a typical page, from top to bottom, what comes right after “<nav>”? (a) <header> (b) <main> (c) <footer>
  25. 25.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h1> or <h2>? (a) <h6> (b) <h3> (c) <h1> (d) <h2>
  26. 26.🌍 What is the protocol in this URL?
    https://school.example.in/about.html
    (a) school.example.in (b) http (c) https (d) /about.html
  27. 27.✍️ Which property is set to 2px solid in this rule?
    li {
      border: 2px solid;
      width: 300px;
      color: red;
    }
    (a) border (b) font-style (c) 2px solid (d) width
  28. 28.🔗 Which words do you click on?
    <a href="https://example.com">Play games</a>
    (a) href (b) Play games (c) https://example.com (d) About us
  29. 29.🧭 Which semantic tag sits at the very top? (a) <aside> (b) <nav> (c) <header> (d) <footer>
  30. 30.✍️ CSS declarations go inside which brackets? (a) [ ] (b) < > (c) ( ) (d) { }
  31. 31.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue<br>Birds sing</p>
  32. 32.True or false: <title> goes in the head. (a) True (b) False
  33. 33.📊 How many rows does this table have?
    <table>
      <tr><td>Mango</td><td>Litchi</td><td>Litchi</td></tr>
      <tr><td>Grapes</td><td>Litchi</td><td>Grapes</td></tr>
      <tr><td>Jamun</td><td>Orange</td><td>Guava</td></tr>
      <tr><td>Litchi</td><td>Mango</td><td>Grapes</td></tr>
    </table>
  34. 34.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 16px;
      }
    }
  35. 35.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) ( (d) <
  36. 36.Which colour pair is easy to read? (a) light grey on white (b) red on green (c) white on dark blue (d) yellow on white
  37. 37.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Space Facts (b) body (c) Thanks for visiting. (d) Easy snacks
  38. 38.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
  39. 39.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a closing tag (d) a comment
  40. 40.⚖️ Which selector is the weakest? (a) a class selector (b) an element selector (c) an id selector

Answer key

  1. Yes
  2. 11
  3. False
  4. blue
  5. in the body
  6. 2
  7. in the same tab
  8. <!DOCTYPE html>
  9. kite.png
  10. F
  11. type a password on http
  12. #ffffff
  13. 3
  14. 33
  15. <form>
  16. 3
  17. when if is false
  18. 4
  19. easy to read
  20. False
  21. 1
  22. 16
  23. <br>
  24. <main>
  25. <h1>
  26. https
  27. border
  28. Play games
  29. <header>
  30. { }
  31. 3
  32. True
  33. 4
  34. 20
  35. <
  36. white on dark blue
  37. Easy snacks
  38. <a href="about.html">
  39. an attribute
  40. an element selector

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