← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 840 · 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 heading shows the BIGGEST text: <h2>, <h1>, <h5> or <h3>? (a) <h3> (b) <h1> (c) <h2> (d) <h5>
  2. 2.📊 How many cells are in each row?
    <table>
      <tr><td>Orange</td><td>Papaya</td><td>Grapes</td></tr>
      <tr><td>Jamun</td><td>Mango</td><td>Guava</td></tr>
      <tr><td>Guava</td><td>Jamun</td><td>Banana</td></tr>
      <tr><td>Mango</td><td>Banana</td><td>Litchi</td></tr>
    </table>
  3. 3.True or false: <input type="password"> hides what you type. (a) False (b) True
  4. 4.🌈 Which colour of light is strongest in rgb(78, 78, 154)? (a) blue (b) green (c) red
  5. 5.🔍 Which is the odd one out? (a) opens web pages for us (b) turns HTML into a page (c) shows pages from the web (d) shows line numbers
  6. 6.🏷️ HTML marks up text using ___. (a) tags (b) keys (c) wires (d) pixels
  7. 7.🔗 Where does this link open?
    <a href="art.html">Contact us</a>
    (a) in the same tab (b) in a new tab
  8. 8.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="sport"> Hockey
      <input type="checkbox" name="sport"> Cricket
      <input type="checkbox" name="sport"> Football
      <input type="checkbox" name="sport"> Chess
    </form>
  9. 9.🎯 Which CSS selector matches this element?
    <span class="box" id="hero">Hello</span>
    (a) .box (b) #box (c) p (d) #top
  10. 10.True or false: <li> shows 1, 2, 3 numbers. (a) False (b) True
  11. 11.⚖️ What colour is the text of this element?
    <h2 class="note" id="intro">Hi</h2>
    CSS:
    #intro { color: green; }
    h2 { color: purple; }
    .note { color: orange; }
    (a) purple (b) green (c) orange (d) black
  12. 12.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <img> (d) <a>
  13. 13.⚡ What number does this code print?
    let a = 28;
    let b = 13;
    console.log(a - b);
  14. 14.🖌️ What colour are the letters?
    p {
      font-size: 12px;
      text-align: center;
      color: orange;
      background-color: purple;
    }
    (a) red (b) orange (c) purple
  15. 15.True or false: <br> has a closing tag. (a) False (b) True
  16. 16.🧭 Which semantic tag holds a news story? (a) <header> (b) <article> (c) <nav> (d) <aside>
  17. 17.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Jamun</td><td>Mango</td></tr>
    </table>
  18. 18.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <h1/> (c) </h1> (d) <\h1>
  19. 19.✍️ Which sign ends each CSS declaration? (a) , (b) ; (c) : (d) .
  20. 20.💬 How does an HTML comment start? (a) // (b) /* (c) # (d) <!--
  21. 21.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="250">
    (a) fort.jpg (b) bus.jpg (c) moon.png (d) The full moon
  22. 22.🔁 What does this code print?
    let temp = 41;
    if (temp < 15) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Hot (b) Cool
  23. 23.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  24. 24.⚡ What does this code print? (Look at the quotes!)
    let x = "2";
    let y = 5;
    console.log(x + y);
    (a) 7 (b) 25 (c) Error
  25. 25.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) ( (d) <
  26. 26.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="250">
  27. 27.⚖️ What colour is the text of this element?
    <p class="red" id="hero">Hi</p>
    CSS:
    p { color: blue; }
    p { color: purple; }
    (a) red (b) yellow (c) blue (d) purple
  28. 28.What does justify-content: space-between do? (a) packs boxes at the start (b) packs boxes at the end (c) equal gaps, none at ends (d) puts boxes in the middle
  29. 29.🔒 Is the connection to this address scrambled (encrypted)?
    https://www.example.net/about.html
    (a) Yes (b) No
  30. 30.Which of these goes in the head? (a) <p> (b) <img> (c) <link rel="stylesheet"> (d) <ul>
  31. 31.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) address (c) attribute (d) editor
  32. 32.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
  33. 33.True or false: <header> helps you move around. (a) True (b) False
  34. 34.🔗 Which address opens when you click this link?
    <a href="games.html">Maths fun</a>
    (a) contact.html (b) Maths fun (c) about.html (d) games.html
  35. 35.🔍 Which is the odd one out? (a) colours code to help us (b) shows line numbers (c) saves our .html files (d) hosts websites online
  36. 36.📊 Which tag holds the whole table? (a) <table> (b) <td> (c) <tr> (d) <th>
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
    <!-- <p>The red kite</p> -->
    <p>Fun facts</p>
  38. 38.🔁 What does this code print?
    let age = 30;
    if (age > 26) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  39. 39.🎨 What does CSS stand for? (a) Creative Sheet System (b) Colourful Site Styles (c) Cascading Style Sheets (d) Computer Style Sheets
  40. 40.💪 Which flexbox property turns on flexbox? (a) display: flex (b) flex-direction (c) align-items (d) gap

Answer key

  1. <h1>
  2. 3
  3. True
  4. blue
  5. shows line numbers
  6. tags
  7. in the same tab
  8. 4
  9. .box
  10. False
  11. green
  12. <img>
  13. 15
  14. orange
  15. False
  16. <article>
  17. 2
  18. </h1>
  19. ;
  20. <!--
  21. moon.png
  22. Cool
  23. No
  24. 25
  25. <
  26. 250
  27. purple
  28. equal gaps, none at ends
  29. Yes
  30. <link rel="stylesheet">
  31. element
  32. True
  33. False
  34. games.html
  35. hosts websites online
  36. <table>
  37. 2
  38. teen
  39. Cascading Style Sheets
  40. display: flex

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