← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 594 · 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: <ul> goes in the head. (a) True (b) False
  2. 2.⚖️ What colour is the text of this element?
    <h2 class="red" id="logo">Hi</h2>
    CSS:
    .red { color: orange; }
    .red { color: green; }
    (a) orange (b) purple (c) black (d) green
  3. 3.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Papaya</td><td>Banana</td></tr>
      <tr><td>Jamun</td><td>Guava</td></tr>
      <tr><td>Papaya</td><td>Papaya</td></tr>
    </table>
  4. 4.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
  5. 5.🌍 Which one scrambles data on its way? (a) the browser (b) the server (c) the URL (d) HTTPS
  6. 6.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) </head> (c) <!DOCTYPE html> (d) <body>
  7. 7.🚀 Which file should this code go in: <a href="a.html">Go</a> (a) style.css (b) script.js (c) index.html
  8. 8.🎨 Which tag holds CSS inside the head? (a) <css> (b) <script> (c) <style> (d) <body>
  9. 9.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <ol> (d) <p>
  10. 10.📝 Which input type hides what you type? (a) date (b) email (c) password (d) text
  11. 11.Which colour pair is easy to read? (a) red on green (b) white on black (c) yellow on white (d) pink on red
  12. 12.📱 What does a media query check? (a) the page title (b) the time of day (c) the screen width (d) the battery level
  13. 13.🚀 Which file should this code go in: <ul><li>Art</li></ul> (a) style.css (b) index.html (c) script.js
  14. 14.♿ What does good colour contrast mean? (a) no colours at all (b) text stands out clearly (c) only red text (d) many bright colours
  15. 15.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
  16. 16.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small> (c) <small/> (d) </small>
  17. 17.✍️ Which sign goes between a property and its value? (a) = (b) ; (c) : (d) -
  18. 18.🔢 In a basic web page file, which comes first: “</body>” or “<head>”? (a) </body> (b) <head>
  19. 19.Which of these is the border? (a) the text or picture (b) the line round the box (c) the gap round content (d) space outside the border
  20. 20.Which of these is padding? (a) space outside the border (b) a solid or dotted edge (c) space inside the border (d) the text or picture
  21. 21.Which of these is true of <nav>? (a) sits at the very top (b) holds copyright notes (c) holds the menu of links (d) holds the main content
  22. 22.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="350">
    (a) width (b) kite.png (c) A red kite (d) Map of India
  23. 23.True or false: <ol> lists steps in order. (a) False (b) True
  24. 24.🎯 Which CSS selector matches this element?
    <span class="note" id="top">Hello</span>
    (a) .big (b) #intro (c) .top (d) #top
  25. 25.🎯 Which element does the selector h2 style? (a) <h2 class="big"> (b) <span id="top"> (c) <li> (d) <div class="big">
  26. 26.True or false: <main> holds extra side notes. (a) True (b) False
  27. 27.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 170px;
      justify-content: flex-end;
    }
    Inside are 3 boxes, each 40px wide (no margins).
  28. 28.🎯 What kind of selector is #top? (a) a class selector (b) an element selector (c) an id selector
  29. 29.🔁 How many times does this code print “Well done”?
    for (let i = 3; i <= 6; i++) {
      console.log("Well done");
    }
  30. 30.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 7; i++) {
      total = total + i;
    }
    console.log(total);
  31. 31.Which of these has a closing tag? (a) <meta> (b) <br> (c) <hr> (d) <title>
  32. 32.True or false: to tell a trusted adult is safe. (a) False (b) True
  33. 33.True or false: a web server turns HTML into a page. (a) True (b) False
  34. 34.📊 How many rows does this table have?
    <table>
      <tr><td>Mango</td><td>Guava</td><td>Guava</td><td>Jamun</td></tr>
      <tr><td>Orange</td><td>Guava</td><td>Grapes</td><td>Papaya</td></tr>
    </table>
  35. 35.True or false: <input type="date"> picks a day. (a) False (b) True
  36. 36.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to make it bigger (d) to colour it
  37. 37.🔁 When does the else part run? (a) always (b) when if is false (c) never (d) when if is true
  38. 38.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 7; i = i + 4) {
      console.log(i);
    }
  39. 39.🔍 One closing tag is missing. Which one?
    <u>Our school trip</u>
    <b>My pets</b>
    <p>The red kite
    (a) </p> (b) </h3> (c) </b> (d) </u>
  40. 40.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>

Answer key

  1. False
  2. green
  3. 2
  4. href
  5. HTTPS
  6. <!DOCTYPE html>
  7. index.html
  8. <style>
  9. <li>
  10. password
  11. white on black
  12. the screen width
  13. index.html
  14. text stands out clearly
  15. -->
  16. </small>
  17. :
  18. <head>
  19. the line round the box
  20. space inside the border
  21. holds the menu of links
  22. A red kite
  23. True
  24. #top
  25. <h2 class="big">
  26. False
  27. 50
  28. an id selector
  29. 4
  30. 28
  31. <title>
  32. True
  33. False
  34. 2
  35. True
  36. to describe the image
  37. when if is false
  38. 4
  39. </p>
  40. <ol>

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