← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 67 · 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 code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a src="about.html">
  2. 2.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <p> (d) <style>
  3. 3.🔁 What does this code print?
    let age = 38;
    if (age >= 23) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) child (b) teen
  4. 4.True or false: <ol> lists steps in order. (a) False (b) True
  5. 5.⚖️ What colour is the text of this element?
    <p class="star" id="main">Hi</p>
    CSS:
    #main { color: red; }
    p { color: yellow; }
    (a) red (b) blue (c) black (d) yellow
  6. 6.🎯 How many elements on a page should have the same id? (a) 2 (b) 5 (c) any number (d) 1
  7. 7.💪 Which flexbox property turns on flexbox? (a) flex-direction (b) justify-content (c) display: flex (d) align-items
  8. 8.⚡ Which tag holds JavaScript in a page? (a) <script> (b) <style> (c) <code> (d) <js>
  9. 9.🧩 Which language makes a link? (a) JavaScript (b) CSS (c) HTML
  10. 10.📱 Responsive design means a page ___. (a) has no pictures (b) is only for laptops (c) never changes (d) fits every screen
  11. 11.🚀 Which file should this code go in: score = score + 1; (a) script.js (b) index.html (c) style.css
  12. 12.🔍 Which line is missing its closing tag?
    line 1: <b>Hello, world!</b>
    line 2: <u>Rain today
    line 3: <p>I love mangoes.</p>
    (a) line 2 (b) line 3 (c) line 1
  13. 13.🔗 Which words do you click on?
    <a href="news.html">School news</a>
    (a) news.html (b) href (c) Take the quiz (d) School news
  14. 14.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) white (c) yellow (d) black
  15. 15.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Cricket is fun.</p>
    <h3>Rain today</h3>
    <h2>My best friend</h2>
    <h4>Fun facts</h4>
  16. 16.🚀 You change your code. What should you do to see the change? (a) switch off the PC (b) rename the folder (c) save and refresh (d) delete the file
  17. 17.True or false: <input type="checkbox"> is for an email address. (a) True (b) False
  18. 18.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 12px;
      }
    }
  19. 19.📦 In the box model, which part is the text or picture? (a) border (b) content (c) margin (d) padding
  20. 20.🌗 Is blue on purple easy or hard to read? (a) easy to read (b) hard to read
  21. 21.Which of these is padding? (a) space inside the border (b) the text or picture (c) a solid or dotted edge (d) the gap to other boxes
  22. 22.✍️ What is the selector in this CSS rule?
    h1 {
      padding: 8px;
      background-color: yellow;
    }
    (a) yellow (b) p (c) h1 (d) padding
  23. 23.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  24. 24.True or false: <td> makes one table row. (a) False (b) True
  25. 25.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <br> (d) <h1>
  26. 26.⚡ Which JavaScript word shows a pop-up box? (a) for (b) if (c) alert() (d) let
  27. 27.🌍 Which one is the page’s address? (a) the browser (b) the URL (c) HTTPS (d) the server
  28. 28.📊 In a table, which tag is a row? (a) <td> (b) <th> (c) <tb> (d) <tr>
  29. 29.⚡ Which word makes a new variable? (a) let (b) make (c) put (d) give
  30. 30.🎯 What kind of selector is #main? (a) an element selector (b) a class selector (c) an id selector
  31. 31.True or false: padding is space inside the border. (a) True (b) False
  32. 32.Which of these is a strong password? (a) Rain#Drop_42! (b) abcd1234 (c) 123456 (d) iloveyou
  33. 33.♿ Does this help everyone, or make the page harder to use: images with no alt? (a) helps everyone (b) makes it harder
  34. 34.Which of these has a closing tag? (a) <br> (b) <hr> (c) <h1> (d) <meta>
  35. 35.Which of these is not safe to do online? (a) use a strong password (b) put secrets in comments (c) keep passwords secret (d) check for https first
  36. 36.🌍 Which one scrambles data on its way? (a) the URL (b) the browser (c) the server (d) HTTPS
  37. 37.🧭 Which semantic tag helps you move around? (a) <nav> (b) <main> (c) <article> (d) <aside>
  38. 38.🖌️ Which CSS property colours behind the text? (a) font-family (b) color (c) background-color (d) font-weight
  39. 39.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    (a) My pets (b) Hello, world! (c) Rain today
  40. 40.📊 How many rows 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>Grapes</td><td>Litchi</td></tr>
      <tr><td>Grapes</td><td>Orange</td><td>Papaya</td><td>Grapes</td></tr>
      <tr><td>Papaya</td><td>Jamun</td><td>Orange</td><td>Litchi</td></tr>
    </table>

Answer key

  1. <a href="about.html">
  2. <p>
  3. teen
  4. True
  5. red
  6. 1
  7. display: flex
  8. <script>
  9. HTML
  10. fits every screen
  11. script.js
  12. line 2
  13. School news
  14. yellow
  15. 4
  16. save and refresh
  17. False
  18. 12
  19. content
  20. hard to read
  21. space inside the border
  22. h1
  23. Yes
  24. False
  25. <h1>
  26. alert()
  27. the URL
  28. <tr>
  29. let
  30. an id selector
  31. True
  32. Rain#Drop_42!
  33. makes it harder
  34. <h1>
  35. put secrets in comments
  36. HTTPS
  37. <nav>
  38. background-color
  39. Hello, world!
  40. 4

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