← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 380 · 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 many paragraphs does this code make?
    <p>The red kite</p>
    <h2>Hello, world!</h2>
    <p>Fun facts</p>
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    <h2>Cricket is fun.</h2>
  2. 2.True or false: HTML on its own can run a game loop. (a) True (b) False
  3. 3.True or false: .big is a class selector. (a) False (b) True
  4. 4.🧭 Why use <nav> instead of <div> for a menu? (a) it adds pictures (b) it tells its meaning (c) it makes text red (d) it loads faster
  5. 5.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 140px;
      justify-content: space-between;
    }
    Inside are 3 boxes, each 40px wide (no margins).
  6. 6.📦 In the box model, which part is space outside the border? (a) margin (b) padding (c) content (d) border
  7. 7.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <br> (d) <ul>
  8. 8.📱 The screen is 320px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 18px;
      }
    }
    (a) No (b) Yes
  9. 9.🔐 Is Rain#Drop_42! a strong or a weak password? (a) weak (b) strong
  10. 10.⚖️ Which selector is the weakest? (a) an element selector (b) an id selector (c) a class selector
  11. 11.True or false: in <img>, src names the picture file. (a) False (b) True
  12. 12.🔗 Which words do you click on?
    <a href="art.html">Take the quiz</a>
    (a) Take the quiz (b) art.html (c) Play games (d) href
  13. 13.📝 Which tag gives a form box a name you can click? (a) <h1> (b) <label> (c) <hr> (d) <title>
  14. 14.🔁 How many numbers does this code print?
    for (let i = 0; i < 17; i = i + 4) {
      console.log(i);
    }
  15. 15.🛡️ Before typing a password on a site, check the address starts with ___. (a) www (b) https (c) ftp (d) http
  16. 16.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="250">
    (a) width (b) fort.jpg (c) A tiger asleep (d) An old fort
  17. 17.🌗 Is white on dark blue easy or hard to read? (a) hard to read (b) easy to read
  18. 18.📝 Which input type picks a day? (a) password (b) date (c) number (d) radio
  19. 19.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) nowhere (d) at the bottom
  20. 20.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
    <p>Rain today</p>
  21. 21.🚀 What is the home page file of a website usually called? (a) start.js (b) index.html (c) main.png (d) home.css
  22. 22.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 260px;
      padding: 25px;
      border: 5px solid black;
      margin: 5px;
    }
  23. 23.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 7; i = i + 3) {
      console.log(i);
    }
  24. 24.True or false: “use headings in order” makes the page harder to use. (a) True (b) False
  25. 25.🌍 What is the path in this URL?
    http://learn.example.com/about.html
    (a) http (b) learn.example.com (c) /maths/tables.html (d) /about.html
  26. 26.🔍 Which is the odd one out? (a) rounds box corners (b) lays out the page (c) makes headings and lists (d) adds space around boxes
  27. 27.True or false: to download from pop-ups is not safe. (a) False (b) True
  28. 28.🚀 Which file should this code go in: score = score + 1; (a) style.css (b) script.js (c) index.html
  29. 29.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
  30. 30.Which of these is a weak password? (a) abcd1234 (b) Mango#Kite29! (c) Blue@Tiger_74 (d) Rain#Drop_42!
  31. 31.Which of these is not safe to do online? (a) use a strong password (b) tell a trusted adult (c) use a nickname in games (d) share your password
  32. 32.Which of these is margin? (a) a solid or dotted edge (b) the gap round content (c) space outside the border (d) space inside the border
  33. 33.True or false: <input type="text"> is for one line of words. (a) True (b) False
  34. 34.📱 What does a media query check? (a) the battery level (b) the time of day (c) the screen width (d) the page title
  35. 35.🛡️ Should you share your password with your best friend? (a) No (b) Yes
  36. 36.📋 Which list tag lists things in any order? (a) <ul> (b) <ol> (c) <li>
  37. 37.📝 Which tag holds a whole form? (a) <ol> (b) <table> (c) <input> (d) <form>
  38. 38.True or false: CSS puts a picture on a page. (a) True (b) False
  39. 39.💪 Which flexbox property picks row or column? (a) justify-content (b) align-items (c) flex-direction (d) gap
  40. 40.✍️ What is the selector in this CSS rule?
    h1 {
      font-style: italic;
      width: 300px;
    }
    (a) p (b) font-style (c) h1 (d) 300px

Answer key

  1. 4
  2. False
  3. True
  4. it tells its meaning
  5. 10
  6. margin
  7. <ol>
  8. Yes
  9. strong
  10. an element selector
  11. True
  12. Take the quiz
  13. <label>
  14. 5
  15. https
  16. An old fort
  17. easy to read
  18. date
  19. on the browser tab
  20. 2
  21. index.html
  22. 330
  23. 6
  24. False
  25. /about.html
  26. makes headings and lists
  27. True
  28. script.js
  29. <ol>
  30. abcd1234
  31. share your password
  32. space outside the border
  33. True
  34. the screen width
  35. No
  36. <ul>
  37. <form>
  38. False
  39. flex-direction
  40. h1

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