← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 789 · 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 CSS property makes the text bold? (a) background-color (b) color (c) font-weight (d) font-size
  2. 2.🧩 Which language counts down a timer? (a) JavaScript (b) CSS (c) HTML
  3. 3.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 280px;
      padding: 5px;
      border: 4px solid black;
      margin: 5px;
    }
  4. 4.⚖️ Which selector is the strongest? (a) an element selector (b) a class selector (c) an id selector
  5. 5.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="250">
    (a) Birthday cake (b) A happy dog (c) width (d) cake.jpg
  6. 6.What is <input type="submit"> for? (a) picks a day (b) is for one line of words (c) lets you pick only one (d) sends the form
  7. 7.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ol>
  8. 8.🚀 Which file should this code go in: .box { padding: 8px; } (a) style.css (b) index.html (c) script.js
  9. 9.🌗 Is white on black easy or hard to read? (a) easy to read (b) hard to read
  10. 10.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <h4>Rain today</h4>
  11. 11.⚖️ What colour is the text of this element?
    <h2 class="star" id="main">Hi</h2>
    CSS:
    .star { color: green; }
    h2 { color: white; }
    #main { color: red; }
    (a) red (b) white (c) yellow (d) green
  12. 12.♿ Is this heading order correct (no level skipped)?
    <h1> → <h2> → <h2> → <h4>
    (a) No (b) Yes
  13. 13.🔐 Is Blue@Tiger_74 a strong or a weak password? (a) weak (b) strong
  14. 14.🧭 Who is helped most by semantic tags? (a) screen-reader users (b) nobody (c) only the server (d) only the printer
  15. 15.⚡ What number does this code print?
    let a = 41;
    let b = 10;
    console.log(a + b);
  16. 16.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
  17. 17.🔒 Is the connection to this address scrambled (encrypted)?
    http://school.example.in/art/gallery.html
    (a) Yes (b) No
  18. 18.True or false: <input type="radio"> lets you pick only one. (a) True (b) False
  19. 19.📊 How many cells are in each row?
    <table>
      <tr><td>Orange</td><td>Mango</td></tr>
      <tr><td>Banana</td><td>Litchi</td></tr>
      <tr><td>Jamun</td><td>Banana</td></tr>
      <tr><td>Orange</td><td>Jamun</td></tr>
    </table>
  20. 20.What does justify-content: flex-end do? (a) equal gaps, none at ends (b) packs boxes at the start (c) packs boxes at the end (d) puts boxes in the middle
  21. 21.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
  22. 22.📝 Which tag gives a form box a name you can click? (a) <h1> (b) <hr> (c) <title> (d) <label>
  23. 23.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h4> or <h6>? (a) <h5> (b) <h4> (c) <h6> (d) <h2>
  24. 24.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>Our school trip</p> -->
    <p>Rain today</p>
    <p>My pets</p>
  25. 25.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>Cricket is fun.</h2>
    <h2>I love mangoes.</h2>
    <h3>Rain today</h3>
  26. 26.Which of these does JavaScript do? (a) changes the text size (b) sets colours and fonts (c) adds space around boxes (d) counts down a timer
  27. 27.True or false: <ul> lists things in any order. (a) False (b) True
  28. 28.🔐 Is S0lar!Pen#8 a strong or a weak password? (a) strong (b) weak
  29. 29.🔗 Which words do you click on?
    <a href="about.html">Play games</a>
    (a) href (b) about.html (c) Play games (d) About us
  30. 30.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 10 (d) 6
  31. 31.⚡ Which JavaScript word writes in the console? (a) let (b) alert() (c) if (d) console.log()
  32. 32.⚖️ What colour is the text of this element?
    <h2 class="note" id="logo">Hi</h2>
    CSS:
    h2 { color: red; }
    h2 { color: black; }
    (a) white (b) black (c) red (d) orange
  33. 33.🌍 What does a web address (URL) tell the browser? (a) where the page is (b) the page colour (c) how old you are (d) your password
  34. 34.🎨 One CSS file can style how many pages? (a) only one word (b) no pages (c) many pages (d) only one image
  35. 35.Which of these is safe to do online? (a) tell a trusted adult (b) share your OTP (c) share your password (d) post your home address
  36. 36.Which of these is true of a code editor? (a) is where we type code (b) shows pages from the web (c) opens web pages for us (d) answers page requests
  37. 37.True or false: <input type="email"> is for an email address. (a) False (b) True
  38. 38.⚖️ What colour is the text of this element?
    <h1 class="note" id="main">Hi</h1>
    CSS:
    #main { color: green; }
    h1 { color: purple; }
    .note { color: blue; }
    (a) blue (b) purple (c) green (d) black
  39. 39.📝 Which tag holds a whole form? (a) <table> (b) <form> (c) <ol> (d) <input>
  40. 40.🖌️ What colour is behind the letters?
    h2 {
      background-color: green;
      text-align: left;
      font-size: 28px;
      color: orange;
    }
    (a) orange (b) yellow (c) green

Answer key

  1. font-weight
  2. JavaScript
  3. 298
  4. an id selector
  5. Birthday cake
  6. sends the form
  7. 3
  8. style.css
  9. easy to read
  10. 2
  11. red
  12. No
  13. strong
  14. screen-reader users
  15. 51
  16. href
  17. No
  18. True
  19. 2
  20. packs boxes at the end
  21. <a>
  22. <label>
  23. <h2>
  24. 2
  25. 4
  26. counts down a timer
  27. True
  28. strong
  29. Play games
  30. 1
  31. console.log()
  32. black
  33. where the page is
  34. many pages
  35. tell a trusted adult
  36. is where we type code
  37. True
  38. green
  39. <form>
  40. green

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