← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 10 · 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.✍️ How does a CSS comment start? (a) # (b) <!-- (c) // (d) /*
  2. 2.♿ A part of the page is under a <h2> heading. Which tag should its sub-heading use? (a) <h3> (b) <h2> (c) <h1> (d) <h4>
  3. 3.🌈 In #fa0000 the red part is the hex number fa. What is it as a normal number?
  4. 4.💪 Which flexbox property lines boxes up across? (a) align-items (b) gap (c) flex-direction (d) justify-content
  5. 5.🧩 Which language makes a link? (a) JavaScript (b) CSS (c) HTML
  6. 6.🔐 Is 123456 a strong or a weak password? (a) strong (b) weak
  7. 7.🌍 What is the path in this URL?
    http://www.example.com/maths/tables.html
    (a) www.example.com (b) /maths/tables.html (c) http (d) /index.html
  8. 8.🎯 Which element does the selector div style? (a) <p class="big"> (b) <div class="big"> (c) <h1 id="top"> (d) <span>
  9. 9.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue<br>Roses are red<br>Rivers flow<br>Stars shine</p>
  10. 10.True or false: <ul> shows bullet points. (a) False (b) True
  11. 11.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) a comment (d) an element name
  12. 12.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a hash # (d) a slash /
  13. 13.📊 Which tag makes a heading cell? (a) <tr> (b) <caption> (c) <td> (d) <th>
  14. 14.🔢 When you open a web page, which comes first: “you type the URL” or “DNS finds the server”? (a) DNS finds the server (b) you type the URL
  15. 15.📊 How many cells are in each row?
    <table>
      <tr><td>Mango</td><td>Jamun</td></tr>
      <tr><td>Guava</td><td>Mango</td></tr>
    </table>
  16. 16.📊 Which tag gives the table a title? (a) <th> (b) <table> (c) <caption> (d) <td>
  17. 17.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
  18. 18.⚖️ What colour is the text of this element?
    <h1 class="big" id="end">Hi</h1>
    CSS:
    h1 { color: blue; }
    .big { color: white; }
    (a) black (b) white (c) blue (d) orange
  19. 19.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) blue (c) white (d) black
  20. 20.🔁 How many times does this code print “Hi”?
    for (let i = 1; i < 3; i++) {
      console.log("Hi");
    }
  21. 21.🔍 One closing tag is missing. Which one?
    <h2>My best friend</h2>
    <p>Cricket is fun.
    <h1>The red kite</h1>
    (a) </h1> (b) </h2> (c) </u> (d) </p>
  22. 22.🔍 One closing tag is missing. Which one?
    <i>My pets
    <small>I love mangoes.</small>
    <b>Hello, world!</b>
    (a) </strong> (b) </small> (c) </i> (d) </b>
  23. 23.⚖️ What colour is the text of this element?
    <p class="note" id="top">Hi</p>
    CSS:
    p { color: red; }
    #top { color: orange; }
    (a) black (b) red (c) white (d) orange
  24. 24.🔁 How many times does this code print “Well done”?
    for (let i = 1; i <= 7; i++) {
      console.log("Well done");
    }
  25. 25.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
  26. 26.True or false: “add alt text to images” makes the page harder to use. (a) False (b) True
  27. 27.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) href (d) id
  28. 28.⚡ Which tag holds JavaScript in a page? (a) <js> (b) <style> (c) <script> (d) <code>
  29. 29.🔠 Are headings shown in bold by default? (a) Yes (b) No
  30. 30.⚖️ What colour is the text of this element?
    <h2 class="red" id="end">Hi</h2>
    CSS:
    #end { color: red; }
    .red { color: orange; }
    (a) orange (b) red (c) green (d) purple
  31. 31.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  32. 32.🌗 Is pink on red easy or hard to read? (a) hard to read (b) easy to read
  33. 33.Which of these is true of a web browser? (a) saves our .html files (b) colours code to help us (c) is where we type code (d) opens web pages for us
  34. 34.🌍 What is the protocol in this URL?
    https://www.example.com/index.html
    (a) /index.html (b) https (c) www.example.com (d) http
  35. 35.⚡ What does this code show?
    let name = "Aman";
    alert("Welcome, " + name + "!");
    (a) name (b) Welcome, Aman! (c) Welcome, name! (d) Aman
  36. 36.⚡ What does alert() show? (a) a new tab (b) a picture (c) a table (d) a pop-up box
  37. 37.🔁 How many times does this code print “Hi”?
    for (let i = 2; i < 6; i++) {
      console.log("Hi");
    }
  38. 38.🎨 What does CSS stand for? (a) Creative Sheet System (b) Colourful Site Styles (c) Cascading Style Sheets (d) Computer Style Sheets
  39. 39.📊 How many cells does this table have in all?
    <table>
      <tr><td>Banana</td><td>Litchi</td><td>Jamun</td></tr>
      <tr><td>Guava</td><td>Banana</td><td>Guava</td></tr>
    </table>
  40. 40.📝 Which tag holds a whole form? (a) <table> (b) <ol> (c) <input> (d) <form>

Answer key

  1. /*
  2. <h3>
  3. 250
  4. align-items
  5. HTML
  6. weak
  7. /maths/tables.html
  8. <div class="big">
  9. 5
  10. True
  11. an attribute
  12. a slash /
  13. <th>
  14. you type the URL
  15. 2
  16. <caption>
  17. 6
  18. white
  19. blue
  20. 2
  21. </p>
  22. </i>
  23. orange
  24. 7
  25. 2
  26. False
  27. href
  28. <script>
  29. Yes
  30. red
  31. has a closing tag
  32. hard to read
  33. opens web pages for us
  34. https
  35. Welcome, Aman!
  36. a pop-up box
  37. 4
  38. Cascading Style Sheets
  39. 6
  40. <form>

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