← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 203 · 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 is the LAST number this code prints?
    for (let i = 0; i < 7; i = i + 2) {
      console.log(i);
    }
  2. 2.🔍 Which is the odd one out? (a) is where we type code (b) sends pages over the net (c) stores a website’s files (d) answers page requests
  3. 3.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
  4. 4.🌍 Which one stores the site’s files? (a) the URL (b) the browser (c) HTTPS (d) the server
  5. 5.♿ Is this heading order correct (no level skipped)?
    <h1> → <h2> → <h2> → <h4>
    (a) No (b) Yes
  6. 6.🧩 Which language changes the text size? (a) CSS (b) HTML (c) JavaScript
  7. 7.🖌️ How big is the text, in px?
    h2 {
      font-size: 16px;
      text-align: right;
      color: purple;
      background-color: blue;
    }
  8. 8.✍️ How does a CSS comment start? (a) /* (b) # (c) <!-- (d) //
  9. 9.🔢 When you open a web page, which comes LAST? (a) the browser asks it (b) you type the URL (c) DNS finds the server (d) the browser shows it
  10. 10.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Fun facts</p>
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <p>My pets</p>
  11. 11.🚀 Which file should this code go in: score = score + 1; (a) index.html (b) script.js (c) style.css
  12. 12.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h4> or <h2>? (a) <h6> (b) <h4> (c) <h2> (d) <h1>
  13. 13.♿ A part of the page is under a <h5> heading. Which tag should its sub-heading use? (a) <h2> (b) <h1> (c) <h6> (d) <h4>
  14. 14.📊 Which tag holds the whole table? (a) <tr> (b) <th> (c) <td> (d) <table>
  15. 15.🖌️ What colour are the letters?
    p {
      background-color: green;
      color: purple;
      text-align: left;
      font-size: 12px;
    }
    (a) purple (b) blue (c) green
  16. 16.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
  17. 17.Which of these is a closing tag? (a) <li> (b) <b> (c) <p> (d) </body>
  18. 18.🖌️ Which CSS property centres a heading? (a) color (b) font-size (c) text-align (d) font-family
  19. 19.True or false: <img> has a closing tag. (a) True (b) False
  20. 20.True or false: a web browser stores a website’s files. (a) False (b) True
  21. 21.Which of these goes in the body? (a) <a> (b) <link rel="stylesheet"> (c) <meta charset="utf-8"> (d) <style>
  22. 22.True or false: <ol> is an unordered list. (a) False (b) True
  23. 23.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
  24. 24.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Guava</li>
    </ol>
    (a) bullets (b) numbers
  25. 25.⚡ What number does this code print?
    let score = 9;
    score = score + 3;
    score = score - 1;
    console.log(score);
  26. 26.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is free (b) the site is fast (c) the data is scrambled (d) the site is a game
  27. 27.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 20px;
      }
    }
  28. 28.📝 What does <p> make? (a) a link (b) a table (c) a paragraph (d) a picture
  29. 29.✍️ In color: blue; which part is the property? (a) ; (b) blue (c) color (d) :
  30. 30.⚡ What number does this code print?
    let apples = 27;
    apples = apples + 7;
    apples = apples - 12;
    console.log(apples);
  31. 31.⚖️ What colour is the text of this element?
    <h1 class="big" id="intro">Hi</h1>
    CSS:
    #intro { color: yellow; }
    .big { color: black; }
    (a) yellow (b) black (c) orange (d) green
  32. 32.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Orange</td><td>Litchi</td><td>Grapes</td></tr>
      <tr><td>Orange</td><td>Litchi</td><td>Banana</td></tr>
    </table>
  33. 33.True or false: HTML adds space around boxes. (a) False (b) True
  34. 34.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Orange</td><td>Grapes</td><td>Papaya</td><td>Orange</td></tr>
      <tr><td>Papaya</td><td>Litchi</td><td>Banana</td><td>Guava</td></tr>
      <tr><td>Guava</td><td>Litchi</td><td>Banana</td><td>Papaya</td></tr>
    </table>
  35. 35.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h1>? (a) <h3> (b) <h2> (c) <h6> (d) <h1>
  36. 36.Which of these is a closing tag? (a) </li> (b) <h1> (c) <body> (d) <b>
  37. 37.Which of these is safe to do online? (a) type a password on http (b) post your home address (c) use a strong password (d) click prize links
  38. 38.🔁 What does this code print?
    let age = 47;
    if (age < 9) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  39. 39.Which of these is true of a web server? (a) colours code to help us (b) answers page requests (c) opens web pages for us (d) saves our .html files
  40. 40.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) makes it bold (d) hides the link

Answer key

  1. 6
  2. is where we type code
  3. False
  4. the server
  5. No
  6. CSS
  7. 16
  8. /*
  9. the browser shows it
  10. 1
  11. script.js
  12. <h1>
  13. <h6>
  14. <table>
  15. purple
  16. 50
  17. </body>
  18. text-align
  19. False
  20. False
  21. <a>
  22. False
  23. <!DOCTYPE html>
  24. numbers
  25. 11
  26. the data is scrambled
  27. 20
  28. a paragraph
  29. color
  30. 22
  31. yellow
  32. 3
  33. False
  34. 4
  35. <h1>
  36. </li>
  37. use a strong password
  38. child
  39. answers page requests
  40. opens it in a new tab

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