← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 535 · 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.True or false: a web browser opens web pages for us. (a) True (b) False
  2. 2.🔁 What does this code print?
    let age = 7;
    if (age < 15) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) child (b) teen
  3. 3.True or false: to tell a trusted adult is not safe. (a) False (b) True
  4. 4.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 90px;
      padding: 20px;
      border: 1px solid black;
      margin: 5px;
    }
  5. 5.📊 Which tag gives the table a title? (a) <tr> (b) <table> (c) <td> (d) <caption>
  6. 6.📊 In a table, which tag is a row? (a) <th> (b) <td> (c) <tr> (d) <tb>
  7. 7.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Litchi</li>
    </ul>
  8. 8.🌈 Which hex code is blue? (a) #000000 (b) #ffffff (c) #0000ff (d) #ffff00
  9. 9.Which of these is true of <article>? (a) is the page’s key part (b) holds the logo and title (c) holds the main content (d) holds one blog post
  10. 10.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="400">
    (a) fort.jpg (b) Our school bus (c) tiger.jpg (d) bus.jpg
  11. 11.📊 Which tag makes one table row? (a) <table> (b) <tr> (c) <th> (d) <td>
  12. 12.🔁 Which loop repeats code a set number of times? (a) let (b) if (c) else (d) for
  13. 13.⚖️ What colour is the text of this element?
    <h2 class="menu" id="logo">Hi</h2>
    CSS:
    .menu { color: red; }
    .menu { color: green; }
    (a) black (b) green (c) blue (d) red
  14. 14.True or false: HTML gives the page structure. (a) False (b) True
  15. 15.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 110px;
      justify-content: space-between;
    }
    Inside are 2 boxes, each 40px wide (no margins).
  16. 16.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <img> (d) <p>
  17. 17.🧭 Which semantic tag holds the main content? (a) <aside> (b) <footer> (c) <main> (d) <article>
  18. 18.True or false: <ul><li>Art</li></ul> goes in script.js. (a) True (b) False
  19. 19.🔍 Which is the odd one out? (a) reacts to a button click (b) shows a pop-up message (c) counts down a timer (d) sets colours and fonts
  20. 20.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h5>? (a) <h3> (b) <h5> (c) <h4> (d) <h2>
  21. 21.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
    <p>My best friend</p>
    (a) Hello, world! (b) The red kite (c) Rain today (d) My best friend
  22. 22.🔍 Which is the odd one out? (a) is where we type code (b) saves our .html files (c) shows pages from the web (d) colours code to help us
  23. 23.🖌️ What colour are the letters?
    h2 {
      font-size: 16px;
      background-color: white;
      text-align: center;
      color: blue;
    }
    (a) green (b) white (c) blue
  24. 24.♿ Is this heading order correct (no level skipped)?
    <h1> → <h2> → <h4> → <h4>
    (a) No (b) Yes
  25. 25.True or false: padding is the line round the box. (a) False (b) True
  26. 26.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    (a) Hello, world! (b) My pets (c) The red kite
  27. 27.🌍 What is the protocol in this URL?
    https://www.example.com/news/today.html
    (a) http (b) www.example.com (c) /news/today.html (d) https
  28. 28.✍️ CSS declarations go inside which brackets? (a) < > (b) ( ) (c) [ ] (d) { }
  29. 29.🔗 Where does this link open?
    <a href="maths.html" target="_blank">School news</a>
    (a) in the same tab (b) in a new tab
  30. 30.What does font-family do? (a) colours behind the text (b) sets the letter colour (c) makes the text bold (d) picks the font style
  31. 31.🧭 Is <section> semantic or not semantic? (a) semantic (b) not semantic
  32. 32.🔢 When you open a web page, which comes first: “DNS finds the server” or “you type the URL”? (a) you type the URL (b) DNS finds the server
  33. 33.🔁 What does this code print?
    let score = 6;
    if (score > 9) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) You win (b) Play again
  34. 34.Which of these has a closing tag? (a) <hr> (b) <b> (c) <input> (d) <img>
  35. 35.🔢 To build and share your first web page, which comes LAST? (a) add CSS styles (b) test in a browser (c) write the HTML (d) publish it online
  36. 36.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  37. 37.📝 What does a password box show instead of letters? (a) numbers (b) capital letters (c) emojis (d) dots
  38. 38.🚀 Which tag loads script.js into a page? (a) <js src="script.js"> (b) <link script.js> (c) <a href="script.js"> (d) <script src="script.js">
  39. 39.🌈 Which colour is #00ff00? (a) blue (b) bright green (c) white (d) cyan
  40. 40.📦 In the box model, which part is space inside the border? (a) padding (b) margin (c) content (d) border

Answer key

  1. True
  2. teen
  3. False
  4. 132
  5. <caption>
  6. <tr>
  7. 2
  8. #0000ff
  9. holds one blog post
  10. bus.jpg
  11. <tr>
  12. for
  13. green
  14. True
  15. 30
  16. <a>
  17. <main>
  18. False
  19. sets colours and fonts
  20. <h2>
  21. The red kite
  22. shows pages from the web
  23. blue
  24. No
  25. False
  26. My pets
  27. https
  28. { }
  29. in a new tab
  30. picks the font style
  31. semantic
  32. you type the URL
  33. Play again
  34. <b>
  35. publish it online
  36. No
  37. dots
  38. <script src="script.js">
  39. bright green
  40. padding

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