← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 410 · 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.♿ Does this help everyone, or make the page harder to use: use big enough text? (a) helps everyone (b) makes it harder
  2. 2.🔁 How many times does this code print “Welcome”?
    for (let i = 0; i < 3; i++) {
      console.log("Welcome");
    }
  3. 3.⚡ Which word makes a new variable? (a) give (b) make (c) put (d) let
  4. 4.🔍 Which line is missing its closing tag?
    line 1: <p>Our school trip
    line 2: <h2>The red kite</h2>
    line 3: <em>My best friend</em>
    (a) line 3 (b) line 2 (c) line 1
  5. 5.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  6. 6.⚖️ What colour is the text of this element?
    <h1 class="big" id="top">Hi</h1>
    CSS:
    h1 { color: yellow; }
    h1 { color: blue; }
    (a) purple (b) red (c) blue (d) yellow
  7. 7.🎨 Which tag holds CSS inside the head? (a) <style> (b) <script> (c) <body> (d) <css>
  8. 8.🎯 How many elements on a page should have the same id? (a) 1 (b) 5 (c) 2 (d) any number
  9. 9.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 3; i++) {
      total = total + 7;
    }
    console.log(total);
  10. 10.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 90px;
      padding: 10px;
      border: 4px solid black;
      margin: 0px;
    }
  11. 11.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>The red kite</p> -->
    <p>Our school trip</p>
    (a) The red kite (b) Our school trip (c) Cricket is fun.
  12. 12.✍️ What is the selector in this CSS rule?
    h1 {
      font-weight: bold;
      width: 300px;
      background-color: yellow;
      margin: 10px;
    }
    (a) 300px (b) font-weight (c) h1 (d) p
  13. 13.🔗 Which words do you click on?
    <a href="contact.html">Art corner</a>
    (a) Art corner (b) href (c) contact.html (d) School news
  14. 14.🔢 To build and share your first web page, which comes LAST? (a) plan what to show (b) publish it online (c) add CSS styles (d) write the HTML
  15. 15.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
  16. 16.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
  17. 17.⚖️ What colour is the text of this element?
    <h2 class="note" id="hero">Hi</h2>
    CSS:
    .note { color: blue; }
    h2 { color: green; }
    #hero { color: black; }
    (a) green (b) orange (c) black (d) blue
  18. 18.📝 Which tag gives a form box a name you can click? (a) <h1> (b) <hr> (c) <label> (d) <title>
  19. 19.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
    <p>Rain today</p>
  20. 20.🧱 HTML gives a web page its ___. (a) structure (b) colours (c) sound (d) speed
  21. 21.True or false: body { margin: 0; } goes in index.html. (a) True (b) False
  22. 22.✍️ What is the selector in this CSS rule?
    #top {
      font-weight: bold;
      margin: 10px;
    }
    (a) li (b) #top (c) 10px (d) font-weight
  23. 23.🔗 Which words do you click on?
    <a href="maths.html">Contact us</a>
    (a) Visit the site (b) href (c) Contact us (d) maths.html
  24. 24.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="200">
    (a) Birthday cake (b) width (c) map.png (d) Map of India
  25. 25.⚡ Which JavaScript word repeats code? (a) for (b) if (c) alert() (d) console.log()
  26. 26.🔠 Are headings shown in bold by default? (a) Yes (b) No
  27. 27.📊 Where do <td> cells go? (a) inside the <head> (b) inside a <li> (c) inside a <p> (d) inside a <tr>
  28. 28.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 14px;
      }
    }
  29. 29.🌈 Which colour of light is strongest in rgb(239, 129, 76)? (a) red (b) blue (c) green
  30. 30.🎯 Which element does the selector .big style? (a) <div class="big"> (b) <div class="red"> (c) <span class="box"> (d) <div id="big">
  31. 31.True or false: JavaScript counts down a timer. (a) True (b) False
  32. 32.True or false: a web browser colours code to help us. (a) False (b) True
  33. 33.Which of these is true of <nav>? (a) sits at the very top (b) holds the logo and title (c) holds the menu of links (d) holds extra side notes
  34. 34.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 460px;
      justify-content: flex-end;
    }
    Inside are 4 boxes, each 100px wide (no margins).
  35. 35.🔤 In “HTML”, what does the L stand for? (a) Link (b) Laptop (c) Language (d) Line
  36. 36.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
  37. 37.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>Fun facts</p> -->
    <p>Hello, world!</p>
    (a) Rain today (b) Hello, world! (c) Fun facts
  38. 38.⚡ What does alert() show? (a) a picture (b) a pop-up box (c) a new tab (d) a table
  39. 39.Which of these is margin? (a) the gap round content (b) the line round the box (c) a solid or dotted edge (d) the gap to other boxes
  40. 40.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) < (d) {

Answer key

  1. helps everyone
  2. 3
  3. let
  4. line 1
  5. an opening tag
  6. blue
  7. <style>
  8. 1
  9. 21
  10. 118
  11. The red kite
  12. h1
  13. Art corner
  14. publish it online
  15. 1
  16. 255
  17. black
  18. <label>
  19. 4
  20. structure
  21. False
  22. #top
  23. Contact us
  24. Map of India
  25. for
  26. Yes
  27. inside a <tr>
  28. 16
  29. red
  30. <div class="big">
  31. True
  32. False
  33. holds the menu of links
  34. 60
  35. Language
  36. <ol>
  37. Fun facts
  38. a pop-up box
  39. the gap to other boxes
  40. <

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