← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 724 · 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 JavaScript word runs code when true? (a) let (b) alert() (c) if (d) console.log()
  2. 2.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h3>I love mangoes.</h3>
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>I love mangoes.</p>
  3. 3.True or false: HTML on its own can add up two numbers. (a) True (b) False
  4. 4.🔁 Which loop repeats code a set number of times? (a) if (b) for (c) let (d) else
  5. 5.📱 Which tag helps phones show a page at the right size? (a) the title tag (b) the br tag (c) the hr tag (d) the viewport meta tag
  6. 6.🔍 One closing tag is missing. Which one?
    <p>I love mangoes.</p>
    <i>Hello, world!
    <h3>Rain today</h3>
    (a) </p> (b) </h3> (c) </i> (d) </em>
  7. 7.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="350">
  8. 8.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h2> or <h3>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
  9. 9.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) element (d) editor
  10. 10.Which colour pair is hard to read? (a) white on dark blue (b) dark grey on white (c) yellow on black (d) light grey on white
  11. 11.True or false: a web browser turns HTML into a page. (a) False (b) True
  12. 12.✍️ How many declarations (property: value pairs) are in this rule?
    h1 {
      border: 2px solid;
    }
  13. 13.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) in a big heading (d) nowhere
  14. 14.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="350">
    (a) cake.jpg (b) Birthday cake (c) width (d) A happy dog
  15. 15.Which of these is not safe to do online? (a) type a password on http (b) keep passwords secret (c) ask before downloading (d) use a strong password
  16. 16.🔢 To build and share your first web page, which comes FIRST? (a) publish it online (b) plan what to show (c) add CSS styles (d) write the HTML
  17. 17.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 440px;
      justify-content: center;
    }
    Inside are 4 boxes, each 100px wide (no margins).
  18. 18.Which of these goes in the head? (a) <table> (b) <h1> (c) <title> (d) <img>
  19. 19.True or false: <ul> lists things in any order. (a) True (b) False
  20. 20.🔢 On a typical page, from top to bottom, which comes first: “<nav>” or “<main>”? (a) <main> (b) <nav>
  21. 21.⚡ What does this code show?
    let name = "Zoya";
    alert("Well done, " + name + "!");
    (a) name (b) Well done, name! (c) Zoya (d) Well done, Zoya!
  22. 22.⚡ Which JavaScript word repeats code? (a) alert() (b) for (c) console.log() (d) let
  23. 23.🔢 To build and share your first web page, what comes right after “write the HTML”? (a) plan what to show (b) add CSS styles (c) publish it online (d) test in a browser
  24. 24.🖌️ Which CSS property sets the letter colour? (a) background-color (b) color (c) font-size (d) font-weight
  25. 25.🔗 Which address opens when you click this link?
    <a href="games.html">Play games</a>
    (a) about.html (b) Play games (c) games.html (d) contact.html
  26. 26.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="300">
    (a) The full moon (b) width (c) A happy dog (d) dog.jpg
  27. 27.True or false: in <img>, width sets how wide it is. (a) True (b) False
  28. 28.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
  29. 29.🌐 Which one shows line numbers? (a) a code editor (b) a web server (c) a web browser
  30. 30.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Litchi</td><td>Papaya</td><td>Guava</td></tr>
      <tr><td>Mango</td><td>Litchi</td><td>Banana</td></tr>
    </table>
  31. 31.Which of these is the content? (a) space inside the border (b) the text or picture (c) the gap to other boxes (d) a solid or dotted edge
  32. 32.🌐 Which one is where we type code? (a) a web server (b) a web browser (c) a code editor
  33. 33.📊 In a table, which tag is a row? (a) <tr> (b) <th> (c) <td> (d) <tb>
  34. 34.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ul>
    (a) numbers (b) bullets
  35. 35.📱 The screen is 700px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 28px;
      }
    }
    (a) Yes (b) No
  36. 36.Which of these is true of <nav>? (a) holds copyright notes (b) is the page’s key part (c) holds extra side notes (d) helps you move around
  37. 37.🔢 To build and share your first web page, which comes LAST? (a) add CSS styles (b) write the HTML (c) publish it online (d) plan what to show
  38. 38.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  39. 39.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 190px;
      padding: 25px;
      border: 4px solid black;
      margin: 5px;
    }
  40. 40.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to add colour (d) to show pictures

Answer key

  1. if
  2. 2
  3. False
  4. for
  5. the viewport meta tag
  6. </i>
  7. 350
  8. <h4>
  9. element
  10. light grey on white
  11. True
  12. 1
  13. on the browser tab
  14. Birthday cake
  15. type a password on http
  16. plan what to show
  17. 20
  18. <title>
  19. True
  20. <nav>
  21. Well done, Zoya!
  22. for
  23. add CSS styles
  24. color
  25. games.html
  26. A happy dog
  27. True
  28. 2
  29. a code editor
  30. 3
  31. the text or picture
  32. a code editor
  33. <tr>
  34. bullets
  35. No
  36. helps you move around
  37. publish it online
  38. has a closing tag
  39. 258
  40. to leave notes

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