← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 860 · 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 of these is true of a web server? (a) opens web pages for us (b) answers page requests (c) is where we type code (d) shows pages from the web
  2. 2.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  3. 3.🎯 Which CSS selector matches this element?
    <p class="note" id="end">Hello</p>
    (a) .big (b) h1 (c) #note (d) .note
  4. 4.⚖️ What colour is the text of this element?
    <h2 class="menu" id="main">Hi</h2>
    CSS:
    .menu { color: blue; }
    .menu { color: green; }
    (a) red (b) blue (c) orange (d) green
  5. 5.📊 Which tag gives the table a title? (a) <tr> (b) <table> (c) <caption> (d) <th>
  6. 6.🔍 One closing tag is missing. Which one?
    <h3>Our school trip
    <small>Fun facts</small>
    <h2>My pets</h2>
    (a) </h1> (b) </h3> (c) </small> (d) </h2>
  7. 7.🧩 Which language gives the page structure? (a) JavaScript (b) HTML (c) CSS
  8. 8.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  9. 9.🖼️ Which attribute of <img> names the picture file? (a) src (b) width (c) alt (d) height
  10. 10.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) bus.jpg (b) A happy dog (c) dog.jpg (d) moon.png
  11. 11.✍️ How many declarations (property: value pairs) are in this rule?
    .note {
      font-style: italic;
    }
  12. 12.⚡ What does this code show?
    let name = "Meera";
    console.log("Hi, " + name + "!");
    (a) name (b) Hi, Meera! (c) Hi, name! (d) Meera
  13. 13.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h4>Cricket is fun.</h4>
    <p>My pets</p>
    <p>Fun facts</p>
  14. 14.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>My pets</p>
    <p>The red kite</p>
    <!-- <p>Rain today</p> -->
    (a) My pets (b) Rain today (c) Fun facts (d) The red kite
  15. 15.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h5> or <h2>? (a) <h6> (b) <h2> (c) <h1> (d) <h5>
  16. 16.Which of these is a strong password? (a) riya2014 (b) iloveyou (c) 123456 (d) Chai$Cup_19x
  17. 17.True or false: <img src="cat.png"> goes in index.html. (a) False (b) True
  18. 18.🔗 Which words do you click on?
    <a href="contact.html">Contact us</a>
    (a) href (b) contact.html (c) Visit the site (d) Contact us
  19. 19.⚖️ What colour is the text of this element?
    <p class="box" id="main">Hi</p>
    CSS:
    #main { color: green; }
    .box { color: blue; }
    (a) yellow (b) blue (c) purple (d) green
  20. 20.True or false: <ul> goes inside ul or ol. (a) True (b) False
  21. 21.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  22. 22.⚡ What number does this code print?
    let a = 55;
    let b = 27;
    console.log(a - b);
  23. 23.⚡ Which word makes a new variable? (a) put (b) make (c) give (d) let
  24. 24.Which of these does HTML do? (a) rounds box corners (b) counts down a timer (c) changes the page live (d) makes a form box
  25. 25.What is <input type="email"> for? (a) lets you tick many (b) hides what you type (c) sends the form (d) is for an email address
  26. 26.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>My best friend</p>
    <h2>My best friend</h2>
    <p>Fun facts</p>
  27. 27.🎯 What kind of selector is #main? (a) an element selector (b) an id selector (c) a class selector
  28. 28.🔁 How many numbers does this code print?
    for (let i = 0; i < 18; i = i + 3) {
      console.log(i);
    }
  29. 29.True or false: <ul> lists steps in order. (a) False (b) True
  30. 30.Which of these is true of a web server? (a) shows line numbers (b) is where we type code (c) turns HTML into a page (d) stores a website’s files
  31. 31.Which of these goes in the head? (a) <p> (b) <meta charset="utf-8"> (c) <img> (d) <a>
  32. 32.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 110px;
      justify-content: flex-start;
    }
    Inside are 2 boxes, each 40px wide (no margins).
  33. 33.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Banana</li>
    </ol>
  34. 34.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 240px;
      justify-content: space-between;
    }
    Inside are 3 boxes, each 60px wide (no margins).
  35. 35.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) alt (c) height (d) src
  36. 36.✍️ How many declarations (property: value pairs) are in this rule?
    body {
      font-size: 20px;
      background-color: yellow;
    }
  37. 37.🛡️ Online: is it safe to tell a trusted adult? (a) not safe (b) safe
  38. 38.⚖️ What colour is the text of this element?
    <h2 class="big" id="logo">Hi</h2>
    CSS:
    #logo { color: blue; }
    #logo { color: yellow; }
    (a) blue (b) green (c) yellow (d) purple
  39. 39.True or false: <caption> makes one table row. (a) False (b) True
  40. 40.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <h2>Fun facts</h2>
    <p>I love mangoes.</p>

Answer key

  1. answers page requests
  2. red
  3. .note
  4. green
  5. <caption>
  6. </h3>
  7. HTML
  8. has a closing tag
  9. src
  10. dog.jpg
  11. 1
  12. Hi, Meera!
  13. 2
  14. Rain today
  15. <h6>
  16. Chai$Cup_19x
  17. True
  18. Contact us
  19. green
  20. False
  21. <ul>
  22. 28
  23. let
  24. makes a form box
  25. is for an email address
  26. 3
  27. an id selector
  28. 6
  29. False
  30. stores a website’s files
  31. <meta charset="utf-8">
  32. 30
  33. 2
  34. 30
  35. height
  36. 2
  37. safe
  38. yellow
  39. False
  40. 2

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