← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 110 · 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 tag holds JavaScript in a page? (a) <script> (b) <code> (c) <js> (d) <style>
  2. 2.⚡ What does JavaScript add to a web page? (a) the page title (b) actions and changes (c) only colours (d) the domain name
  3. 3.🖌️ Where does the text sit on its line?
    h1 {
      background-color: black;
      text-align: left;
      font-size: 24px;
      color: purple;
    }
    (a) in the middle (b) on the right (c) on the left
  4. 4.🔢 To build and share your first web page, what comes right after “write the HTML”? (a) publish it online (b) plan what to show (c) add CSS styles (d) test in a browser
  5. 5.True or false: <li> lists things in any order. (a) True (b) False
  6. 6.True or false: <aside> helps you move around. (a) False (b) True
  7. 7.🧩 Which language checks a quiz answer? (a) CSS (b) JavaScript (c) HTML
  8. 8.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <ol> (d) <hr>
  9. 9.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  10. 10.⚡ What number does this code print?
    let a = 13;
    let b = 9;
    console.log(a - b);
  11. 11.🎨 Which tag connects an outside CSS file? (a) <a> (b) <link> (c) <css> (d) <img>
  12. 12.True or false: .card is an id selector. (a) False (b) True
  13. 13.♿ Does this help everyone, or make the page harder to use: use headings in order? (a) helps everyone (b) makes it harder
  14. 14.True or false: the browser shows the page to you. (a) True (b) False
  15. 15.🖌️ Where does the text sit on its line?
    p {
      font-size: 24px;
      text-align: center;
      color: yellow;
      background-color: blue;
    }
    (a) on the right (b) in the middle (c) on the left
  16. 16.🔗 Where does this link open?
    <a href="news.html" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab
  17. 17.True or false: <li> is an unordered list. (a) False (b) True
  18. 18.📋 What number does the browser show next to “Guava”?
    <ol start="3">
      <li>Grapes</li>
      <li>Guava</li>
      <li>Papaya</li>
    </ol>
  19. 19.📊 How many cells does this table have in all?
    <table>
      <tr><td>Litchi</td><td>Mango</td></tr>
      <tr><td>Guava</td><td>Mango</td></tr>
      <tr><td>Litchi</td><td>Jamun</td></tr>
      <tr><td>Grapes</td><td>Guava</td></tr>
    </table>
  20. 20.✍️ How many declarations (property: value pairs) are in this rule?
    body {
      width: 300px;
      padding: 8px;
      text-align: center;
    }
  21. 21.📊 How many cells are in each row?
    <table>
      <tr><td>Mango</td><td>Grapes</td><td>Papaya</td></tr>
      <tr><td>Mango</td><td>Guava</td><td>Mango</td></tr>
    </table>
  22. 22.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 11; i = i + 4) {
      console.log(i);
    }
  23. 23.Which of these is a closing tag? (a) <b> (b) <li> (c) <title> (d) </title>
  24. 24.⚖️ Which selector is the strongest? (a) a class selector (b) an element selector (c) an id selector
  25. 25.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  26. 26.📄 Can HTML on its own make a form? (a) No (b) Yes
  27. 27.✍️ What value is given to font-style in this rule?
    p {
      margin: 10px;
      color: red;
      font-style: italic;
    }
    (a) italic (b) font-style (c) red (d) 20px
  28. 28.True or false: <footer> sits at the bottom. (a) True (b) False
  29. 29.🌗 Is blue on purple easy or hard to read? (a) easy to read (b) hard to read
  30. 30.🧭 Who is helped most by semantic tags? (a) only the printer (b) screen-reader users (c) nobody (d) only the server
  31. 31.🖌️ What colour is behind the letters?
    h1 {
      color: green;
      background-color: white;
      text-align: left;
      font-size: 16px;
    }
    (a) red (b) green (c) white
  32. 32.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  33. 33.Which of these goes in the head? (a) <p> (b) <a> (c) <link rel="stylesheet"> (d) <table>
  34. 34.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) All about me (b) We won by 5 runs. (c) index.html (d) Space Facts
  35. 35.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <p>My pets</p>
    <h2>I love mangoes.</h2>
  36. 36.🖌️ What colour are the letters?
    li {
      background-color: white;
      color: red;
      text-align: left;
      font-size: 24px;
    }
    (a) red (b) purple (c) white
  37. 37.✍️ Which property is set to 20px in this rule?
    li {
      border: 2px solid;
      font-size: 20px;
    }
    (a) text-align (b) background-color (c) font-size (d) 20px
  38. 38.📝 What does <p> make? (a) a paragraph (b) a picture (c) a table (d) a link
  39. 39.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  40. 40.True or false: <table> holds the whole table. (a) False (b) True

Answer key

  1. <script>
  2. actions and changes
  3. on the left
  4. add CSS styles
  5. False
  6. False
  7. JavaScript
  8. <ul>
  9. in the body
  10. 4
  11. <link>
  12. False
  13. helps everyone
  14. True
  15. in the middle
  16. in a new tab
  17. False
  18. 4
  19. 8
  20. 3
  21. 3
  22. 8
  23. </title>
  24. an id selector
  25. in the head
  26. Yes
  27. italic
  28. True
  29. hard to read
  30. screen-reader users
  31. white
  32. 4
  33. <link rel="stylesheet">
  34. Space Facts
  35. 4
  36. red
  37. font-size
  38. a paragraph
  39. Yes
  40. True

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