← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 299 · 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 colour is rgb(0, 255, 0)? (a) white (b) bright green (c) blue (d) magenta
  2. 2.True or false: <table> holds the whole table. (a) False (b) True
  3. 3.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  4. 4.🔗 Which words do you click on?
    <a href="contact.html">Maths fun</a>
    (a) Maths fun (b) contact.html (c) Art corner (d) href
  5. 5.🔍 One closing tag is missing. Which one?
    <i>I love mangoes.
    <strong>Our school trip</strong>
    <h2>Rain today</h2>
    (a) </b> (b) </strong> (c) </i> (d) </h2>
  6. 6.🔍 Which is the odd one out? (a) shows a pop-up message (b) puts a picture on a page (c) checks a quiz answer (d) reacts to a button click
  7. 7.🔁 When does the else part run? (a) when if is true (b) always (c) when if is false (d) never
  8. 8.⚡ What does this code print? (Look at the quotes!)
    let x = "4";
    let y = 5;
    console.log(x + y);
    (a) 45 (b) 9 (c) Error
  9. 9.🔗 Which words do you click on?
    <a href="contact.html">About us</a>
    (a) Contact us (b) contact.html (c) About us (d) href
  10. 10.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  11. 11.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Rain today</p>
    <p>My best friend</p>
    <p>Good morning!</p>
  12. 12.💪 Which justify-content value packs boxes at the start? (a) space-between (b) center (c) flex-start (d) flex-end
  13. 13.📱 The screen is 375px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 26px;
      }
    }
    (a) No (b) Yes
  14. 14.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) opens it in a new tab (d) hides the link
  15. 15.🔍 Which is the odd one out? (a) hosts websites online (b) saves our .html files (c) sends pages over the net (d) answers page requests
  16. 16.True or false: HTML on its own cannot count button clicks. (a) False (b) True
  17. 17.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 90px;
      padding: 20px;
      border: 4px solid black;
      margin: 0px;
    }
  18. 18.Which of these has a closing tag? (a) <li> (b) <meta> (c) <img> (d) <br>
  19. 19.🔗 Which words do you click on?
    <a href="maths.html">Art corner</a>
    (a) School news (b) href (c) maths.html (d) Art corner
  20. 20.True or false: CSS puts a picture on a page. (a) False (b) True
  21. 21.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 140px;
      padding: 20px;
      border: 3px solid black;
      margin: 0px;
    }
  22. 22.True or false: <tr> makes one table row. (a) False (b) True
  23. 23.🔁 Which word runs code only when something is true? (a) for (b) let (c) log (d) if
  24. 24.True or false: in <img>, width sets how wide it is. (a) True (b) False
  25. 25.📝 Which tag makes a drop-down list? (a) <ul> (b) <ol> (c) <select> (d) <li>
  26. 26.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h6> or <h5>? (a) <h3> (b) <h5> (c) <h6> (d) <h2>
  27. 27.🎯 What kind of selector is .menu? (a) a class selector (b) an element selector (c) an id selector
  28. 28.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 70px;
      padding: 5px;
      border: 2px solid black;
      margin: 0px;
    }
  29. 29.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 190px;
      justify-content: space-between;
    }
    Inside are 2 boxes, each 80px wide (no margins).
  30. 30.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
  31. 31.🚀 Which file should this code go in: <a href="a.html">Go</a> (a) script.js (b) index.html (c) style.css
  32. 32.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
  33. 33.⚖️ What colour is the text of this element?
    <h2 class="red" id="intro">Hi</h2>
    CSS:
    .red { color: yellow; }
    #intro { color: purple; }
    h2 { color: green; }
    (a) green (b) purple (c) yellow (d) red
  34. 34.✍️ What value is given to border in this rule?
    .note {
      font-size: 20px;
      background-color: yellow;
      border: 2px solid;
    }
    (a) 2px solid (b) border (c) italic (d) 300px
  35. 35.📝 Which tag holds a whole form? (a) <input> (b) <form> (c) <table> (d) <ol>
  36. 36.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <p> (d) <img>
  37. 37.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h6> or <h3>? (a) <h5> (b) <h3> (c) <h4> (d) <h6>
  38. 38.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 20px;
      }
    }
  39. 39.True or false: h1 is an id selector. (a) True (b) False
  40. 40.🔗 Where does this link open?
    <a href="https://example.com">Play games</a>
    (a) in a new tab (b) in the same tab

Answer key

  1. bright green
  2. True
  3. an opening tag
  4. Maths fun
  5. </i>
  6. puts a picture on a page
  7. when if is false
  8. 45
  9. About us
  10. Yes
  11. 4
  12. flex-start
  13. No
  14. opens it in a new tab
  15. saves our .html files
  16. True
  17. 138
  18. <li>
  19. Art corner
  20. False
  21. 186
  22. True
  23. if
  24. True
  25. <select>
  26. <h6>
  27. a class selector
  28. 84
  29. 30
  30. 255
  31. index.html
  32. False
  33. purple
  34. 2px solid
  35. <form>
  36. <img>
  37. <h3>
  38. 20
  39. False
  40. in the same tab

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