← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 729 · 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.✍️ What value is given to font-style in this rule?
    .note {
      width: 300px;
      color: red;
      font-style: italic;
      font-size: 20px;
    }
    (a) red (b) font-style (c) 20px (d) italic
  2. 2.Which of these is safe to do online? (a) tell a trusted adult (b) type a password on http (c) click prize links (d) share your OTP
  3. 3.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h1> or <h3>? (a) <h4> (b) <h3> (c) <h5> (d) <h1>
  4. 4.🎯 Which element does the selector .big style? (a) <h2 id="big"> (b) <h2 class="big"> (c) <li class="box"> (d) <h2 class="red">
  5. 5.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  6. 6.Which of these is true of a web browser? (a) saves our .html files (b) stores a website’s files (c) colours code to help us (d) turns HTML into a page
  7. 7.🔁 What does this code print?
    let marks = 10;
    if (marks > 30) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Pass (b) Try again
  8. 8.📝 Which input type picks a day? (a) password (b) email (c) date (d) submit
  9. 9.📊 Which tag makes one data cell? (a) <table> (b) <td> (c) <tr> (d) <th>
  10. 10.🌈 Which hex code is cyan? (a) #ffff00 (b) #ff00ff (c) #00ffff (d) #00ff00
  11. 11.🔁 What does this code print?
    let marks = 3;
    if (marks < 33) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Pass (b) Try again
  12. 12.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  13. 13.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h2>? (a) <h5> (b) <h1> (c) <h2> (d) <h4>
  14. 14.🔍 Which is the odd one out? (a) changes the page live (b) lays out the page (c) counts down a timer (d) reacts to a button click
  15. 15.🧭 Is <header> semantic or not semantic? (a) not semantic (b) semantic
  16. 16.📝 Which input type is for an email address? (a) submit (b) number (c) email (d) password
  17. 17.🎯 What kind of selector is #top? (a) a class selector (b) an id selector (c) an element selector
  18. 18.True or false: <caption> gives the table a title. (a) False (b) True
  19. 19.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h2>Hello, world!</h2>
    <p>Fun facts</p>
    <h4>Cricket is fun.</h4>
    <h3>Good morning!</h3>
  20. 20.⚡ What number does this code print?
    let coins = 9;
    coins = coins + 15;
    coins = coins - 16;
    console.log(coins);
  21. 21.⚖️ What colour is the text of this element?
    <h1 class="box" id="end">Hi</h1>
    CSS:
    #end { color: yellow; }
    .box { color: red; }
    h1 { color: white; }
    (a) red (b) yellow (c) white (d) orange
  22. 22.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 150px;
      justify-content: flex-end;
    }
    Inside are 3 boxes, each 40px wide (no margins).
  23. 23.True or false: JavaScript checks a quiz answer. (a) True (b) False
  24. 24.🔁 How many numbers does this code print?
    for (let i = 0; i < 12; i = i + 3) {
      console.log(i);
    }
  25. 25.🚀 What is the home page file of a website usually called? (a) home.css (b) main.png (c) index.html (d) start.js
  26. 26.📱 The screen is 1100px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 20px;
      }
    }
    (a) Yes (b) No
  27. 27.💬 Does the browser show comments on the page? (a) Yes (b) No
  28. 28.⚡ What number does this code print?
    let coins = 14;
    coins = coins + 4;
    coins = coins - 16;
    console.log(coins);
  29. 29.True or false: alert("Hi"); goes in index.html. (a) False (b) True
  30. 30.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 220px;
      padding: 5px;
      border: 1px solid black;
      margin: 10px;
    }
  31. 31.🔢 To build and share your first web page, which comes FIRST? (a) plan what to show (b) write the HTML (c) test in a browser (d) publish it online
  32. 32.Which of these is an empty tag? (a) <title> (b) <b> (c) <p> (d) <br>
  33. 33.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Markup (c) Machine (d) Modern
  34. 34.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
  35. 35.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 240px;
      padding: 25px;
      border: 1px solid black;
      margin: 10px;
    }
  36. 36.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 20px;
      }
    }
  37. 37.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  38. 38.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>My best friend</p>
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
  39. 39.True or false: .note is an element selector. (a) False (b) True
  40. 40.🌍 What is the path in this URL?
    https://learn.example.com/art/gallery.html
    (a) /news/today.html (b) https (c) /art/gallery.html (d) learn.example.com

Answer key

  1. italic
  2. tell a trusted adult
  3. <h5>
  4. <h2 class="big">
  5. an opening tag
  6. turns HTML into a page
  7. Try again
  8. date
  9. <td>
  10. #00ffff
  11. Pass
  12. <ol>
  13. <h1>
  14. lays out the page
  15. semantic
  16. email
  17. an id selector
  18. True
  19. 4
  20. 8
  21. yellow
  22. 30
  23. True
  24. 4
  25. index.html
  26. No
  27. No
  28. 2
  29. False
  30. 232
  31. plan what to show
  32. <br>
  33. Markup
  34. a web server
  35. 312
  36. 20
  37. in the body
  38. 3
  39. False
  40. /art/gallery.html

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