← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 13 · 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 property is set to 20px in this rule?
    .note {
      font-weight: bold;
      font-size: 20px;
    }
    (a) text-align (b) font-size (c) 20px (d) background-color
  2. 2.True or false: HTML on its own cannot keep a high score. (a) False (b) True
  3. 3.🖌️ Which CSS property makes the text bold? (a) font-size (b) background-color (c) font-family (d) font-weight
  4. 4.🔁 What does this code print?
    let temp = 1;
    if (temp > 6) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Cool (b) Hot
  5. 5.⚖️ What colour is the text of this element?
    <p class="red" id="top">Hi</p>
    CSS:
    .red { color: black; }
    #top { color: yellow; }
    p { color: red; }
    (a) red (b) black (c) blue (d) yellow
  6. 6.⚡ What does this code print? (Look at the quotes!)
    let x = "3";
    let y = 7;
    console.log(x + y);
    (a) Error (b) 37 (c) 10
  7. 7.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
  8. 8.🧭 Which semantic tag holds extra side notes? (a) <header> (b) <nav> (c) <aside> (d) <footer>
  9. 9.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Rain today</p>
    <p>Hello, world!</p>
  10. 10.What does justify-content: flex-start do? (a) packs boxes at the end (b) packs boxes at the start (c) equal gaps, none at ends (d) puts boxes in the middle
  11. 11.🔗 Which words do you click on?
    <a href="about.html">Visit the site</a>
    (a) Visit the site (b) href (c) about.html (d) Maths fun
  12. 12.🚀 Which file should this code go in: alert(score); (a) index.html (b) script.js (c) style.css
  13. 13.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) index.html (b) Cricket Club (c) Easy snacks (d) Here is my best one.
  14. 14.💬 How does an HTML comment start? (a) /* (b) # (c) // (d) <!--
  15. 15.🧩 Which language adds space around boxes? (a) JavaScript (b) CSS (c) HTML
  16. 16.🔗 Where does this link open?
    <a href="about.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  17. 17.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 16px;
      }
    }
  18. 18.True or false: the URL is the page’s address. (a) True (b) False
  19. 19.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 120px;
      justify-content: flex-end;
    }
    Inside are 2 boxes, each 40px wide (no margins).
  20. 20.True or false: HTML on its own can make tables. (a) False (b) True
  21. 21.True or false: <table> holds the whole table. (a) True (b) False
  22. 22.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 120px;
      padding: 25px;
      border: 2px solid black;
      margin: 5px;
    }
  23. 23.True or false: #logo is an id selector. (a) True (b) False
  24. 24.🌍 What is the path in this URL?
    https://kids.example.org/art/gallery.html
    (a) kids.example.org (b) /art/gallery.html (c) /news/today.html (d) https
  25. 25.🌈 Which colour of light is strongest in rgb(62, 251, 37)? (a) blue (b) red (c) green
  26. 26.🧩 Which language makes headings and lists? (a) CSS (b) JavaScript (c) HTML
  27. 27.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 140px;
      padding: 15px;
      border: 4px solid black;
      margin: 5px;
    }
  28. 28.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h3>My pets</h3>
    <h4>The red kite</h4>
  29. 29.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <p>Cricket is fun.</p>
  30. 30.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="100">
  31. 31.True or false: a web server shows line numbers. (a) True (b) False
  32. 32.⚡ Which JavaScript word shows a pop-up box? (a) let (b) if (c) for (d) alert()
  33. 33.📝 Which input type lets you tick many? (a) text (b) email (c) radio (d) checkbox
  34. 34.True or false: .star is a class selector. (a) False (b) True
  35. 35.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <h2>Hello, world!</h2>
    <h2>I love mangoes.</h2>
    <p>Cricket is fun.</p>
  36. 36.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) index.html (b) My Hobbies (c) Here is my best one. (d) Planets
  37. 37.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 99 (d) 1000
  38. 38.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 200px;
      justify-content: space-between;
    }
    Inside are 3 boxes, each 60px wide (no margins).
  39. 39.🎯 Which CSS selector matches this element?
    <div class="red" id="end">Hello</div>
    (a) .red (b) .box (c) #red (d) .end
  40. 40.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ul>

Answer key

  1. font-size
  2. True
  3. font-weight
  4. Cool
  5. yellow
  6. 37
  7. <ul>
  8. <aside>
  9. 3
  10. packs boxes at the start
  11. Visit the site
  12. script.js
  13. Cricket Club
  14. <!--
  15. CSS
  16. in a new tab
  17. 20
  18. True
  19. 40
  20. True
  21. True
  22. 174
  23. True
  24. /art/gallery.html
  25. green
  26. HTML
  27. 188
  28. 3
  29. 3
  30. 100
  31. False
  32. alert()
  33. checkbox
  34. True
  35. 3
  36. My Hobbies
  37. 255
  38. 10
  39. .red
  40. 3

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