← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 526 · 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.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank
  2. 2.🔍 One closing tag is missing. Which one?
    <small>I love mangoes.</small>
    <strong>My pets
    <i>Rain today</i>
    (a) </small> (b) </i> (c) </b> (d) </strong>
  3. 3.🎯 How many elements on a page should have the same id? (a) any number (b) 1 (c) 2 (d) 5
  4. 4.💬 How does an HTML comment start? (a) # (b) <!-- (c) // (d) /*
  5. 5.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 22px;
      }
    }
  6. 6.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  7. 7.📝 Which tag gives a form box a name you can click? (a) <title> (b) <label> (c) <h1> (d) <hr>
  8. 8.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) share it with friends (b) close it, tell an adult (c) click it twice (d) type the password
  9. 9.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 120px;
      justify-content: center;
    }
    Inside are 2 boxes, each 50px wide (no margins).
  10. 10.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 8; i++) {
      total = total + 7;
    }
    console.log(total);
  11. 11.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 7; i = i + 4) {
      console.log(i);
    }
  12. 12.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>My best friend</h2>
    <h2>Good morning!</h2>
    <h2>Good morning!</h2>
    <p>Our school trip</p>
    <p>My pets</p>
  13. 13.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>My pets</p>
    <h2>Hello, world!</h2>
    <h2>My best friend</h2>
    <p>Fun facts</p>
  14. 14.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h4> or <h3>? (a) <h3> (b) <h6> (c) <h2> (d) <h4>
  15. 15.♿ Does this help everyone, or make the page harder to use: use headings in order? (a) helps everyone (b) makes it harder
  16. 16.✍️ CSS declarations go inside which brackets? (a) ( ) (b) { } (c) [ ] (d) < >
  17. 17.🔁 How many times does this code print “Hello”?
    for (let i = 1; i < 5; i++) {
      console.log("Hello");
    }
  18. 18.🌍 What is the domain name in this URL?
    http://www.example.com/about.html
    (a) kids.example.org (b) /about.html (c) www.example.com (d) http
  19. 19.Which of these is an opening tag? (a) </body> (b) </li> (c) <li> (d) </b>
  20. 20.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <li> (d) <ul>
  21. 21.📊 In a table, which tag is a row? (a) <th> (b) <tb> (c) <td> (d) <tr>
  22. 22.🖌️ Which CSS property makes letters bigger? (a) font-weight (b) background-color (c) color (d) font-size
  23. 23.📱 The screen is 540px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 18px;
      }
    }
    (a) No (b) Yes
  24. 24.⚖️ What colour is the text of this element?
    <p class="box" id="end">Hi</p>
    CSS:
    #end { color: blue; }
    #end { color: purple; }
    (a) purple (b) black (c) blue (d) red
  25. 25.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Orange</li>
    </ul>
    (a) bullets (b) numbers
  26. 26.📝 Which tag holds a whole form? (a) <table> (b) <form> (c) <input> (d) <ol>
  27. 27.💪 Which justify-content value packs boxes at the start? (a) flex-end (b) space-between (c) flex-start (d) center
  28. 28.🚀 You change your code. What should you do to see the change? (a) delete the file (b) save and refresh (c) switch off the PC (d) rename the folder
  29. 29.🖌️ Where does the text sit on its line?
    p {
      color: white;
      font-size: 32px;
      background-color: green;
      text-align: left;
    }
    (a) on the left (b) on the right (c) in the middle
  30. 30.🔗 Which words do you click on?
    <a href="art.html">School news</a>
    (a) School news (b) href (c) art.html (d) Take the quiz
  31. 31.🏷️ HTML marks up text using ___. (a) tags (b) keys (c) pixels (d) wires
  32. 32.🌈 Which colour of light is strongest in rgb(161, 113, 33)? (a) red (b) blue (c) green
  33. 33.Which colour pair is easy to read? (a) yellow on black (b) red on green (c) yellow on white (d) blue on purple
  34. 34.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Banana</td><td>Orange</td><td>Orange</td><td>Jamun</td></tr>
      <tr><td>Guava</td><td>Papaya</td><td>Papaya</td><td>Litchi</td></tr>
    </table>
  35. 35.✍️ What is the selector in this CSS rule?
    p {
      margin: 10px;
      text-align: center;
    }
    (a) center (b) p (c) .note (d) margin
  36. 36.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to make it bigger (d) to describe the image
  37. 37.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
  38. 38.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Kites fly high<br>Birds sing<br>Roses are red</p>
  39. 39.What is <input type="date"> for? (a) hides what you type (b) picks a day (c) is for an email address (d) lets you tick many
  40. 40.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <h1> (d) <p>

Answer key

  1. opens it in a new tab
  2. </strong>
  3. 1
  4. <!--
  5. 24
  6. Yes
  7. <label>
  8. close it, tell an adult
  9. 10
  10. 56
  11. 4
  12. 3
  13. 3
  14. <h6>
  15. helps everyone
  16. { }
  17. 4
  18. www.example.com
  19. <li>
  20. <li>
  21. <tr>
  22. font-size
  23. Yes
  24. purple
  25. bullets
  26. <form>
  27. flex-start
  28. save and refresh
  29. on the left
  30. School news
  31. tags
  32. red
  33. yellow on black
  34. 4
  35. p
  36. to describe the image
  37. blue
  38. 4
  39. picks a day
  40. <h1>

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