← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 439 · 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.What does font-weight do? (a) makes the text bold (b) makes letters bigger (c) centres a heading (d) sets the letter colour
  2. 2.🔗 Which words do you click on?
    <a href="games.html">School news</a>
    (a) href (b) School news (c) Take the quiz (d) games.html
  3. 3.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="fruit"> Mango
      <input type="checkbox" name="fruit"> Papaya
      <input type="checkbox" name="fruit"> Guava
    </form>
  4. 4.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <link rel="stylesheet"> (c) <table> (d) <style>
  5. 5.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) red (c) bright green (d) black
  6. 6.🔗 Which address opens when you click this link?
    <a href="contact.html">Art corner</a>
    (a) maths.html (b) https://example.com (c) Art corner (d) contact.html
  7. 7.🧩 Which language adds space around boxes? (a) CSS (b) JavaScript (c) HTML
  8. 8.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <ul> (d) <p>
  9. 9.True or false: “colour as the only clue” helps everyone use the page. (a) True (b) False
  10. 10.📝 Which input type sends the form? (a) email (b) password (c) radio (d) submit
  11. 11.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 190px;
      padding: 15px;
      border: 2px solid black;
      margin: 20px;
    }
  12. 12.🚀 Which file is best for code that reacts to clicks? (a) style.css (b) notes.txt (c) script.js (d) index.html
  13. 13.💬 How does an HTML comment end? (a) >> (b) */ (c) --> (d) //
  14. 14.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="sport"> Hockey
      <input type="radio" name="sport"> Cricket
      <input type="radio" name="sport"> Kabaddi
    </form>
  15. 15.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 3; i++) {
      total = total + 2;
    }
    console.log(total);
  16. 16.Which of these is padding? (a) the gap to other boxes (b) space inside the border (c) the line round the box (d) the text or picture
  17. 17.📊 How many cells does this table have in all?
    <table>
      <tr><td>Litchi</td><td>Banana</td></tr>
      <tr><td>Banana</td><td>Guava</td></tr>
    </table>
  18. 18.📦 In the box model, which part is a solid or dotted edge? (a) content (b) padding (c) border (d) margin
  19. 19.🔍 Which line is missing its closing tag?
    line 1: <h3>My pets
    line 2: <small>Hello, world!</small>
    line 3: <h2>The red kite</h2>
    (a) line 1 (b) line 3 (c) line 2
  20. 20.Which of these is padding? (a) the gap to other boxes (b) the gap round content (c) the line round the box (d) a solid or dotted edge
  21. 21.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
  22. 22.Which of these is not safe to do online? (a) tell a trusted adult (b) check for https first (c) log out on shared PCs (d) type a password on http
  23. 23.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <!-- <p>The red kite</p> -->
    <p>Fun facts</p>
  24. 24.🖌️ What colour are the letters?
    h1 {
      color: yellow;
      text-align: center;
      background-color: white;
      font-size: 12px;
    }
    (a) white (b) black (c) yellow
  25. 25.✍️ In color: blue; which part is the property? (a) ; (b) blue (c) color (d) :
  26. 26.True or false: <p> is an empty tag. (a) True (b) False
  27. 27.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  28. 28.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
  29. 29.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the later one (b) the shorter one (c) neither (d) the first one
  30. 30.✍️ Which sign ends each CSS declaration? (a) , (b) : (c) ; (d) .
  31. 31.True or false: body { margin: 0; } goes in style.css. (a) True (b) False
  32. 32.Which of these is an opening tag? (a) </li> (b) </p> (c) </body> (d) <p>
  33. 33.📊 Which tag makes a heading cell? (a) <td> (b) <table> (c) <th> (d) <caption>
  34. 34.⚖️ What colour is the text of this element?
    <p class="menu" id="top">Hi</p>
    CSS:
    #top { color: blue; }
    .menu { color: red; }
    p { color: black; }
    (a) red (b) black (c) blue (d) green
  35. 35.✍️ How many declarations (property: value pairs) are in this rule?
    #top {
      background-color: yellow;
      border: 2px solid;
      width: 300px;
      padding: 8px;
    }
  36. 36.🚀 Which file should this code go in: <img src="cat.png"> (a) index.html (b) style.css (c) script.js
  37. 37.⚖️ What colour is the text of this element?
    <h2 class="note" id="top">Hi</h2>
    CSS:
    #top { color: white; }
    #top { color: black; }
    (a) white (b) black (c) green (d) orange
  38. 38.🔍 Which is the odd one out? (a) changes the page live (b) puts a picture on a page (c) reacts to a button click (d) checks a quiz answer
  39. 39.True or false: <h1> has a closing tag. (a) False (b) True
  40. 40.🔗 Where does this link open?
    <a href="contact.html">Contact us</a>
    (a) in the same tab (b) in a new tab

Answer key

  1. makes the text bold
  2. School news
  3. 3
  4. <table>
  5. cyan
  6. contact.html
  7. CSS
  8. <li>
  9. False
  10. submit
  11. 264
  12. script.js
  13. -->
  14. 1
  15. 6
  16. space inside the border
  17. 4
  18. border
  19. line 1
  20. the gap round content
  21. red
  22. type a password on http
  23. 3
  24. yellow
  25. color
  26. False
  27. in the head
  28. <ol>
  29. the later one
  30. ;
  31. True
  32. <p>
  33. <th>
  34. blue
  35. 4
  36. index.html
  37. black
  38. puts a picture on a page
  39. True
  40. in the same tab

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