← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 78 · 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 one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
  2. 2.✍️ How does a CSS comment start? (a) /* (b) // (c) # (d) <!--
  3. 3.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the later one (b) the first one (c) the shorter one (d) neither
  4. 4.💪 Which justify-content value equal gaps, none at ends? (a) center (b) flex-end (c) space-between (d) flex-start
  5. 5.📱 Which tag helps phones show a page at the right size? (a) the br tag (b) the title tag (c) the hr tag (d) the viewport meta tag
  6. 6.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 28px;
      }
    }
  7. 7.🏷️ Which is the closing tag for <u>? (a) <\u> (b) </u> (c) <u/> (d) <u>
  8. 8.⚖️ What colour is the text of this element?
    <p class="menu" id="top">Hi</p>
    CSS:
    p { color: red; }
    #top { color: orange; }
    (a) red (b) orange (c) yellow (d) green
  9. 9.Which of these is a closing tag? (a) </title> (b) <body> (c) <p> (d) <li>
  10. 10.🚀 Where in index.html does the link to style.css go? (a) in the footer (b) after </html> (c) in the head (d) inside a <p>
  11. 11.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
  12. 12.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) red (d) white
  13. 13.🔗 Which words do you click on?
    <a href="maths.html">Maths fun</a>
    (a) maths.html (b) Art corner (c) Maths fun (d) href
  14. 14.True or false: to think before you post is safe. (a) False (b) True
  15. 15.True or false: <p> is an empty tag. (a) False (b) True
  16. 16.🎯 How many elements on a page should have the same id? (a) 5 (b) 2 (c) any number (d) 1
  17. 17.Which of these is not safe to do online? (a) type a password on http (b) tell a trusted adult (c) use a strong password (d) think before you post
  18. 18.🧩 Which language adds space around boxes? (a) JavaScript (b) CSS (c) HTML
  19. 19.✍️ How many declarations (property: value pairs) are in this rule?
    li {
      color: red;
      padding: 8px;
    }
  20. 20.✍️ How many declarations (property: value pairs) are in this rule?
    .note {
      font-size: 20px;
    }
  21. 21.True or false: the border is space inside the border. (a) True (b) False
  22. 22.⚡ What number does this code print?
    let apples = 8;
    apples = apples + 13;
    apples = apples - 21;
    console.log(apples);
  23. 23.✍️ Which sign ends each CSS declaration? (a) ; (b) . (c) : (d) ,
  24. 24.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  25. 25.⚡ Which JavaScript word makes a new variable? (a) console.log() (b) if (c) let (d) for
  26. 26.Which of these does JavaScript do? (a) changes the page live (b) changes the text size (c) puts a picture on a page (d) makes headings and lists
  27. 27.Which of these is true of <footer>? (a) holds copyright notes (b) holds a news story (c) sits at the very top (d) holds extra side notes
  28. 28.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h6> (d) <h1>
  29. 29.📛 In <a href="x.html">, what is href? (a) an element name (b) a closing tag (c) a comment (d) an attribute
  30. 30.🎯 What kind of selector is h1? (a) a class selector (b) an element selector (c) an id selector
  31. 31.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) width (c) src (d) height
  32. 32.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 140px;
      justify-content: flex-start;
    }
    Inside are 3 boxes, each 40px wide (no margins).
  33. 33.Which of these is true of a web server? (a) colours code to help us (b) shows line numbers (c) stores a website’s files (d) shows pages from the web
  34. 34.📊 Which tag makes one data cell? (a) <table> (b) <caption> (c) <td> (d) <tr>
  35. 35.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
  36. 36.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h2> or <h1>? (a) <h4> (b) <h1> (c) <h2> (d) <h3>
  37. 37.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 8; i++) {
      total = total + 8;
    }
    console.log(total);
  38. 38.True or false: <li> shows bullet points. (a) True (b) False
  39. 39.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) href (d) id
  40. 40.🔗 Which address opens when you click this link?
    <a href="art.html">About us</a>
    (a) art.html (b) news.html (c) quiz.html (d) About us

Answer key

  1. a web browser
  2. /*
  3. the later one
  4. space-between
  5. the viewport meta tag
  6. 28
  7. </u>
  8. orange
  9. </title>
  10. in the head
  11. False
  12. blue
  13. Maths fun
  14. True
  15. False
  16. 1
  17. type a password on http
  18. CSS
  19. 2
  20. 1
  21. False
  22. 0
  23. ;
  24. an opening tag
  25. let
  26. changes the page live
  27. holds copyright notes
  28. <h1>
  29. an attribute
  30. an element selector
  31. width
  32. 20
  33. stores a website’s files
  34. <td>
  35. red
  36. <h1>
  37. 64
  38. False
  39. href
  40. art.html

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