← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 848 · 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 of these is not safe to do online? (a) log out on shared PCs (b) check for https first (c) share your password (d) think before you post
  2. 2.🧭 Which semantic tag holds extra side notes? (a) <nav> (b) <footer> (c) <header> (d) <aside>
  3. 3.⚡ What number does this code print?
    let apples = 10;
    apples = apples + 17;
    apples = apples - 7;
    console.log(apples);
  4. 4.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
  5. 5.📝 What does <p> make? (a) a paragraph (b) a link (c) a table (d) a picture
  6. 6.⚖️ What colour is the text of this element?
    <h1 class="box" id="intro">Hi</h1>
    CSS:
    h1 { color: yellow; }
    #intro { color: orange; }
    .box { color: white; }
    (a) green (b) white (c) yellow (d) orange
  7. 7.What does font-family do? (a) makes letters bigger (b) centres a heading (c) picks the font style (d) colours behind the text
  8. 8.🎯 How many elements on a page should have the same id? (a) 5 (b) 1 (c) 2 (d) any number
  9. 9.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
  10. 10.📄 Can HTML on its own make a form? (a) Yes (b) No
  11. 11.Which of these is true of <aside>? (a) holds extra side notes (b) holds one blog post (c) holds the logo and title (d) sits at the very top
  12. 12.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Banana</li>
    </ol>
  13. 13.📝 Which input type lets you tick many? (a) checkbox (b) date (c) number (d) password
  14. 14.🔁 How many numbers does this code print?
    for (let i = 0; i < 13; i = i + 2) {
      console.log(i);
    }
  15. 15.🔍 Which is the odd one out? (a) makes headings and lists (b) reacts to a button click (c) checks a quiz answer (d) counts down a timer
  16. 16.📝 Which input type picks a day? (a) radio (b) date (c) checkbox (d) text
  17. 17.🔁 How many numbers does this code print?
    for (let i = 0; i < 9; i = i + 2) {
      console.log(i);
    }
  18. 18.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h2>Hello, world!</h2>
    <h4>Cricket is fun.</h4>
    <p>Good morning!</p>
    <p>Rain today</p>
  19. 19.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
  20. 20.📊 Which tag holds the whole table? (a) <tr> (b) <caption> (c) <table> (d) <th>
  21. 21.⚡ What number does this code print?
    let runs = 24;
    runs = runs + 18;
    runs = runs - 30;
    console.log(runs);
  22. 22.💪 Which justify-content value packs boxes at the end? (a) center (b) flex-start (c) space-between (d) flex-end
  23. 23.💪 Which justify-content value puts boxes in the middle? (a) center (b) flex-start (c) flex-end (d) space-between
  24. 24.True or false: JavaScript shows a pop-up message. (a) False (b) True
  25. 25.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Kites fly high</p>
  26. 26.What does justify-content: space-between do? (a) equal gaps, none at ends (b) puts boxes in the middle (c) packs boxes at the end (d) packs boxes at the start
  27. 27.True or false: <input type="email"> lets you tick many. (a) False (b) True
  28. 28.🔢 On a typical page, from top to bottom, what comes right after “<nav>”? (a) <footer> (b) <header> (c) <main>
  29. 29.True or false: <input type="password"> lets you tick many. (a) False (b) True
  30. 30.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <p>My best friend</p>
  31. 31.True or false: JavaScript checks a quiz answer. (a) False (b) True
  32. 32.True or false: to type a password on http is not safe. (a) False (b) True
  33. 33.🔗 Which address opens when you click this link?
    <a href="https://example.com">About us</a>
    (a) https://example.com (b) About us (c) art.html (d) maths.html
  34. 34.🔁 How many times does this code print “Hi”?
    for (let i = 1; i <= 9; i++) {
      console.log("Hi");
    }
  35. 35.True or false: “use big enough text” helps everyone use the page. (a) False (b) True
  36. 36.🔢 On a typical page, from top to bottom, what comes right after “<header>”? (a) <footer> (b) <main> (c) <nav>
  37. 37.🚀 Which file should this code go in: let score = 0; (a) index.html (b) script.js (c) style.css
  38. 38.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 5; i++) {
      total = total + i;
    }
    console.log(total);
  39. 39.⚖️ What colour is the text of this element?
    <p class="menu" id="main">Hi</p>
    CSS:
    p { color: orange; }
    p { color: white; }
    (a) black (b) orange (c) red (d) white
  40. 40.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>

Answer key

  1. share your password
  2. <aside>
  3. 20
  4. in the body
  5. a paragraph
  6. orange
  7. picks the font style
  8. 1
  9. 100
  10. Yes
  11. holds extra side notes
  12. 5
  13. checkbox
  14. 7
  15. makes headings and lists
  16. date
  17. 5
  18. 3
  19. 4
  20. <table>
  21. 12
  22. flex-end
  23. center
  24. True
  25. 2
  26. equal gaps, none at ends
  27. False
  28. <main>
  29. False
  30. 3
  31. True
  32. True
  33. https://example.com
  34. 9
  35. True
  36. <nav>
  37. script.js
  38. 15
  39. white
  40. <img>

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