← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 233 · 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 tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
  2. 2.🧭 How many <main> parts should a page have? (a) none (b) one (c) ten (d) three
  3. 3.🌗 Is blue on purple easy or hard to read? (a) hard to read (b) easy to read
  4. 4.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as one space (d) as a new line
  5. 5.📦 In the box model, which part is the gap round content? (a) border (b) margin (c) padding (d) content
  6. 6.🔢 When you open a web page, which comes first: “you type the URL” or “the browser shows it”? (a) the browser shows it (b) you type the URL
  7. 7.🔢 When you open a web page, which comes first: “DNS finds the server” or “you type the URL”? (a) you type the URL (b) DNS finds the server
  8. 8.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 300px;
      padding: 30px;
      border: 3px solid black;
      margin: 5px;
    }
  9. 9.🔢 In a basic web page file, which comes first: “<html>” or “</head>”? (a) <html> (b) </head>
  10. 10.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the later one (b) the first one (c) neither (d) the shorter one
  11. 11.🔗 Which address opens when you click this link?
    <a href="news.html">Art corner</a>
    (a) news.html (b) Art corner (c) games.html (d) quiz.html
  12. 12.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ul> (d) <ol>
  13. 13.⚖️ What colour is the text of this element?
    <h1 class="star" id="main">Hi</h1>
    CSS:
    #main { color: purple; }
    #main { color: yellow; }
    (a) purple (b) black (c) yellow (d) orange
  14. 14.🔗 Where does this link open?
    <a href="news.html">Art corner</a>
    (a) in a new tab (b) in the same tab
  15. 15.What does justify-content: flex-end do? (a) puts boxes in the middle (b) packs boxes at the end (c) packs boxes at the start (d) equal gaps, none at ends
  16. 16.💪 Which justify-content value packs boxes at the end? (a) flex-end (b) flex-start (c) center (d) space-between
  17. 17.💬 Does the browser show comments on the page? (a) Yes (b) No
  18. 18.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Banana</td><td>Jamun</td><td>Litchi</td></tr>
      <tr><td>Jamun</td><td>Banana</td><td>Jamun</td></tr>
    </table>
  19. 19.Which of these is true of a web browser? (a) sends pages over the net (b) saves our .html files (c) has an address bar (d) stores a website’s files
  20. 20.🔢 On a typical page, from top to bottom, what comes right after “<nav>”? (a) <main> (b) <footer> (c) <header>
  21. 21.Which of these goes in the head? (a) <title> (b) <img> (c) <p> (d) <h1>
  22. 22.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 7; i++) {
      total = total + i;
    }
    console.log(total);
  23. 23.✍️ Which property is set to center in this rule?
    h2 {
      margin: 10px;
      width: 300px;
      text-align: center;
    }
    (a) background-color (b) center (c) margin (d) text-align
  24. 24.True or false: <style> goes in the head. (a) False (b) True
  25. 25.🔍 Which is the odd one out? (a) changes the text size (b) adds space around boxes (c) changes the page live (d) lays out the page
  26. 26.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <ul> (c) <li>
  27. 27.🔗 Which address opens when you click this link?
    <a href="games.html">School news</a>
    (a) contact.html (b) games.html (c) School news (d) about.html
  28. 28.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h4>? (a) <h6> (b) <h4> (c) <h3> (d) <h2>
  29. 29.True or false: <title> goes in the head. (a) False (b) True
  30. 30.Which of these is an opening tag? (a) </b> (b) </li> (c) </body> (d) <h1>
  31. 31.📝 What does <p> make? (a) a picture (b) a table (c) a link (d) a paragraph
  32. 32.⚖️ What colour is the text of this element?
    <p class="box" id="top">Hi</p>
    CSS:
    p { color: orange; }
    .box { color: white; }
    #top { color: purple; }
    (a) white (b) purple (c) orange (d) green
  33. 33.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 310px;
      justify-content: flex-end;
    }
    Inside are 3 boxes, each 100px wide (no margins).
  34. 34.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="fruit"> Papaya
      <input type="checkbox" name="fruit"> Guava
      <input type="checkbox" name="fruit"> Banana
    </form>
  35. 35.💪 Which flexbox property sets space between boxes? (a) justify-content (b) display: flex (c) align-items (d) gap
  36. 36.✍️ What is the selector in this CSS rule?
    h1 {
      margin: 10px;
      font-style: italic;
      text-align: center;
      font-weight: bold;
    }
    (a) italic (b) p (c) h1 (d) margin
  37. 37.⚖️ What colour is the text of this element?
    <h2 class="big" id="hero">Hi</h2>
    CSS:
    .big { color: yellow; }
    .big { color: orange; }
    (a) blue (b) orange (c) white (d) yellow
  38. 38.True or false: <li> lists things in any order. (a) False (b) True
  39. 39.🔁 Which word runs code only when something is true? (a) let (b) for (c) if (d) log
  40. 40.🌐 Which one has an address bar? (a) a web browser (b) a web server (c) a code editor

Answer key

  1. <a>
  2. one
  3. hard to read
  4. as one space
  5. padding
  6. you type the URL
  7. you type the URL
  8. 376
  9. <html>
  10. the later one
  11. news.html
  12. <li>
  13. yellow
  14. in the same tab
  15. packs boxes at the end
  16. flex-end
  17. No
  18. 3
  19. has an address bar
  20. <main>
  21. <title>
  22. 28
  23. text-align
  24. True
  25. changes the page live
  26. <li>
  27. games.html
  28. <h2>
  29. True
  30. <h1>
  31. a paragraph
  32. purple
  33. 10
  34. 3
  35. gap
  36. h1
  37. orange
  38. False
  39. if
  40. a web browser

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