← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 309 · 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.🖌️ How big is the text, in px?
    h1 {
      text-align: left;
      color: yellow;
      font-size: 28px;
      background-color: blue;
    }
  2. 2.⚖️ What colour is the text of this element?
    <p class="menu" id="end">Hi</p>
    CSS:
    p { color: white; }
    #end { color: orange; }
    (a) yellow (b) orange (c) white (d) red
  3. 3.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) width (d) alt
  4. 4.True or false: to think before you post is not safe. (a) True (b) False
  5. 5.📱 The screen is 1100px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 16px;
      }
    }
    (a) Yes (b) No
  6. 6.✍️ What is the selector in this CSS rule?
    .box {
      background-color: yellow;
      font-size: 20px;
    }
    (a) 20px (b) background-color (c) .box (d) h2
  7. 7.♿ Who uses a screen reader? (a) only coders (b) only teachers (c) people who are blind (d) only robots
  8. 8.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
  9. 9.True or false: alert(score); goes in style.css. (a) False (b) True
  10. 10.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <!-- <p>The red kite</p> -->
    (a) I love mangoes. (b) The red kite (c) Fun facts
  11. 11.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h2>I love mangoes.</h2>
    <h3>My pets</h3>
    <p>Good morning!</p>
    <h2>Our school trip</h2>
  12. 12.Which of these is the content? (a) the gap to other boxes (b) the line round the box (c) a solid or dotted edge (d) the text or picture
  13. 13.What does font-size do? (a) makes letters bigger (b) colours behind the text (c) centres a heading (d) sets the letter colour
  14. 14.⚡ What does this code print? (Look at the quotes!)
    let x = "7";
    let y = 2;
    console.log(x + y);
    (a) 72 (b) 9 (c) Error
  15. 15.🧭 Which semantic tag sits at the very top? (a) <header> (b) <footer> (c) <aside> (d) <nav>
  16. 16.🌈 Which colour is #ffff00? (a) bright green (b) red (c) yellow (d) black
  17. 17.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Sky is blue<br>Birds sing<br>Kites fly high</p>
  18. 18.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) About us (b) href (c) Play games (d) games.html
  19. 19.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h6> or <h3>? (a) <h6> (b) <h5> (c) <h2> (d) <h3>
  20. 20.True or false: CSS puts a picture on a page. (a) True (b) False
  21. 21.⚖️ What colour is the text of this element?
    <p class="star" id="main">Hi</p>
    CSS:
    .star { color: blue; }
    #main { color: white; }
    (a) green (b) white (c) blue (d) black
  22. 22.🔢 To build and share your first web page, which comes first: “publish it online” or “write the HTML”? (a) write the HTML (b) publish it online
  23. 23.💪 Which justify-content value packs boxes at the start? (a) center (b) flex-start (c) space-between (d) flex-end
  24. 24.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Mango</li>
    </ul>
    (a) numbers (b) bullets
  25. 25.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    <p>Rain today</p>
    (a) My pets (b) Rain today (c) My best friend
  26. 26.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) My drawings (b) My Hobbies (c) index.html (d) Here is my best one.
  27. 27.✍️ Which property is set to 300px in this rule?
    li {
      text-align: center;
      width: 300px;
    }
    (a) font-style (b) 300px (c) width (d) color
  28. 28.True or false: in <img>, height shows if the image fails. (a) False (b) True
  29. 29.⚡ Which tag holds JavaScript in a page? (a) <script> (b) <js> (c) <style> (d) <code>
  30. 30.📱 The screen is 1366px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 10px;
      }
    }
    (a) Yes (b) No
  31. 31.🔁 How many times does this code print “Hello”?
    for (let i = 2; i < 11; i++) {
      console.log("Hello");
    }
  32. 32.🔢 To build and share your first web page, which comes first: “add CSS styles” or “plan what to show”? (a) plan what to show (b) add CSS styles
  33. 33.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Birds sing<br>Rivers flow</p>
  34. 34.♿ Does this help everyone, or make the page harder to use: colour as the only clue? (a) makes it harder (b) helps everyone
  35. 35.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h1> or <h4>? (a) <h5> (b) <h1> (c) <h3> (d) <h4>
  36. 36.📄 Can HTML on its own make links to pages? (a) No (b) Yes
  37. 37.🌈 Which colour is #00ff00? (a) white (b) yellow (c) bright green (d) red
  38. 38.True or false: h1 is an element selector. (a) False (b) True
  39. 39.📊 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>Banana</td><td>Mango</td><td>Guava</td></tr>
    </table>
  40. 40.⚡ What number does this code print?
    let a = 56;
    let b = 2;
    console.log(a - b);

Answer key

  1. 28
  2. orange
  3. alt
  4. False
  5. No
  6. .box
  7. people who are blind
  8. <ol>
  9. False
  10. The red kite
  11. 4
  12. the text or picture
  13. makes letters bigger
  14. 72
  15. <header>
  16. yellow
  17. 4
  18. Play games
  19. <h6>
  20. False
  21. white
  22. write the HTML
  23. flex-start
  24. bullets
  25. My best friend
  26. My Hobbies
  27. width
  28. False
  29. <script>
  30. No
  31. 9
  32. plan what to show
  33. 3
  34. makes it harder
  35. <h5>
  36. Yes
  37. bright green
  38. True
  39. 2
  40. 54

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