← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 481 · 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.True or false: <header> holds extra side notes. (a) True (b) False
  2. 2.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Papaya</td><td>Grapes</td><td>Litchi</td></tr>
      <tr><td>Jamun</td><td>Guava</td><td>Orange</td></tr>
    </table>
  3. 3.⚡ What does this code print? (Look at the quotes!)
    let x = "5";
    let y = 7;
    console.log(x + y);
    (a) 57 (b) 12 (c) Error
  4. 4.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
  5. 5.True or false: <ul> goes in the head. (a) True (b) False
  6. 6.🔍 Which line is missing its closing tag?
    line 1: <p>Cricket is fun.</p>
    line 2: <strong>Fun facts</strong>
    line 3: <i>The red kite
    (a) line 1 (b) line 2 (c) line 3
  7. 7.📱 The screen is 820px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 24px;
      }
    }
    (a) No (b) Yes
  8. 8.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 110px;
      padding: 10px;
      border: 3px solid black;
      margin: 5px;
    }
  9. 9.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 260px;
      justify-content: space-between;
    }
    Inside are 3 boxes, each 40px wide (no margins).
  10. 10.⚖️ Which selector is the weakest? (a) an id selector (b) an element selector (c) a class selector
  11. 11.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h5> (d) <h3>
  12. 12.Which colour pair is easy to read? (a) red on green (b) pink on red (c) dark grey on white (d) yellow on white
  13. 13.🔁 How many numbers does this code print?
    for (let i = 0; i < 8; i = i + 2) {
      console.log(i);
    }
  14. 14.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Kites fly high</p>
  15. 15.♿ Is this heading order correct (no level skipped)?
    <h1> → <h2> → <h3> → <h4>
    (a) Yes (b) No
  16. 16.Which of these is true of <article>? (a) holds one blog post (b) holds the menu of links (c) holds copyright notes (d) holds the main content
  17. 17.🌍 What is the path in this URL?
    https://www.example.net/maths/tables.html
    (a) www.example.net (b) /index.html (c) /maths/tables.html (d) https
  18. 18.True or false: the browser scrambles data on its way. (a) True (b) False
  19. 19.True or false: <h1> has a closing tag. (a) True (b) False
  20. 20.📄 Can HTML on its own make tables? (a) No (b) Yes
  21. 21.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="250">
  22. 22.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h5> or <h1>? (a) <h5> (b) <h4> (c) <h1> (d) <h6>
  23. 23.⚡ What does this code print? (Look at the quotes!)
    let x = "5";
    let y = 9;
    console.log(x + y);
    (a) 14 (b) 59 (c) Error
  24. 24.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a hash # (d) a dot .
  25. 25.True or false: the border is the line round the box. (a) False (b) True
  26. 26.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) cake.jpg (b) A happy dog (c) Birthday cake (d) width
  27. 27.⚖️ What colour is the text of this element?
    <h2 class="note" id="top">Hi</h2>
    CSS:
    .note { color: blue; }
    #top { color: yellow; }
    (a) black (b) white (c) blue (d) yellow
  28. 28.🔁 What does i++ do? (a) doubles i (b) takes 1 from i (c) adds 1 to i (d) prints i
  29. 29.🎯 Which sign starts a class selector? (a) & (b) # (c) . (d) @
  30. 30.🔠 Which tag is the least important heading? (a) <h1> (b) <h6> (c) <h3> (d) <p>
  31. 31.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Banana</li>
    </ol>
    (a) bullets (b) numbers
  32. 32.🔍 One closing tag is missing. Which one?
    <h1>I love mangoes.</h1>
    <h2>My best friend</h2>
    <p>Good morning!
    (a) </small> (b) </h1> (c) </h2> (d) </p>
  33. 33.Which of these is an opening tag? (a) </body> (b) <li> (c) </h1> (d) </p>
  34. 34.📊 How many rows does this table have?
    <table>
      <tr><td>Mango</td><td>Papaya</td><td>Jamun</td><td>Mango</td></tr>
      <tr><td>Guava</td><td>Jamun</td><td>Jamun</td><td>Guava</td></tr>
      <tr><td>Papaya</td><td>Guava</td><td>Orange</td><td>Orange</td></tr>
    </table>
  35. 35.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 4; i++) {
      total = total + 8;
    }
    console.log(total);
  36. 36.What is <input type="radio"> for? (a) picks a day (b) lets you pick only one (c) lets you tick many (d) is for an email address
  37. 37.🔗 Where does this link open?
    <a href="about.html" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  38. 38.🌈 Which colour of light is strongest in rgb(5, 162, 82)? (a) blue (b) red (c) green
  39. 39.📱 min-width: 800px applies when the screen is ___. (a) 800px or narrower (b) exactly 100px (c) turned off (d) 800px or wider
  40. 40.💬 How does an HTML comment start? (a) /* (b) # (c) <!-- (d) //

Answer key

  1. False
  2. 9
  3. 57
  4. False
  5. False
  6. line 3
  7. Yes
  8. 146
  9. 70
  10. an element selector
  11. <h1>
  12. dark grey on white
  13. 4
  14. 2
  15. Yes
  16. holds one blog post
  17. /maths/tables.html
  18. False
  19. True
  20. Yes
  21. 250
  22. <h6>
  23. 59
  24. a slash /
  25. True
  26. Birthday cake
  27. yellow
  28. adds 1 to i
  29. .
  30. <h6>
  31. numbers
  32. </p>
  33. <li>
  34. 3
  35. 32
  36. lets you pick only one
  37. in a new tab
  38. green
  39. 800px or wider
  40. <!--

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