← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 8 · 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.📱 min-width: 800px applies when the screen is ___. (a) turned off (b) 800px or narrower (c) exactly 100px (d) 800px or wider
  2. 2.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) white (c) black (d) bright green
  3. 3.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 200px;
      padding: 10px;
      border: 4px solid black;
      margin: 0px;
    }
  4. 4.🔁 How many times does this code print “Hello”?
    for (let i = 2; i <= 9; i++) {
      console.log("Hello");
    }
  5. 5.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) Space Facts (c) index.html (d) Match report
  6. 6.🖌️ Which CSS property colours behind the text? (a) background-color (b) font-family (c) text-align (d) font-size
  7. 7.🔐 Is 123456 a strong or a weak password? (a) strong (b) weak
  8. 8.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 26px;
      }
    }
  9. 9.⚡ What does this code print? (Look at the quotes!)
    let x = "3";
    let y = 9;
    console.log(x + y);
    (a) Error (b) 39 (c) 12
  10. 10.📝 What does <br> do? (a) starts a new line (b) makes text bold (c) adds a picture (d) makes a list
  11. 11.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
    <p>My pets</p>
    (a) Cricket is fun. (b) Hello, world! (c) My pets
  12. 12.🧩 Which language reacts to a button click? (a) JavaScript (b) HTML (c) CSS
  13. 13.Which of these is true of <footer>? (a) holds one blog post (b) holds extra side notes (c) sits at the very top (d) sits at the bottom
  14. 14.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h5>? (a) <h1> (b) <h3> (c) <h2> (d) <h5>
  15. 15.💬 How does an HTML comment end? (a) // (b) >> (c) */ (d) -->
  16. 16.📋 What number does the browser show next to “Guava”?
    <ol start="2">
      <li>Banana</li>
      <li>Guava</li>
      <li>Jamun</li>
    </ol>
  17. 17.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) hides the link (d) makes it bold
  18. 18.✍️ Which property is set to italic in this rule?
    .box {
      font-weight: bold;
      font-style: italic;
      font-size: 20px;
    }
    (a) font-size (b) font-style (c) italic (d) color
  19. 19.Which of these is true of a web server? (a) saves our .html files (b) sends pages over the net (c) turns HTML into a page (d) colours code to help us
  20. 20.🔒 Is the connection to this address scrambled (encrypted)?
    http://kids.example.org/maths/tables.html
    (a) Yes (b) No
  21. 21.🚀 Where in index.html does the link to style.css go? (a) after </html> (b) inside a <p> (c) in the footer (d) in the head
  22. 22.⚡ What does this code print? (Look at the quotes!)
    let x = "1";
    let y = 3;
    console.log(x + y);
    (a) 13 (b) Error (c) 4
  23. 23.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>My pets</p>
    <p>My pets</p>
    <h3>My best friend</h3>
    <p>Cricket is fun.</p>
  24. 24.🏷️ Every HTML tag starts with which sign? (a) < (b) [ (c) { (d) (
  25. 25.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 26px;
      }
    }
  26. 26.True or false: HTML gives the page structure. (a) True (b) False
  27. 27.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="sport"> Kabaddi
      <input type="radio" name="sport"> Hockey
      <input type="radio" name="sport"> Chess
      <input type="radio" name="sport"> Football
    </form>
  28. 28.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) kite.png (b) tiger.jpg (c) A tiger asleep (d) map.png
  29. 29.📊 How many rows does this table have?
    <table>
      <tr><td>Banana</td><td>Mango</td><td>Papaya</td></tr>
      <tr><td>Jamun</td><td>Papaya</td><td>Guava</td></tr>
      <tr><td>Grapes</td><td>Orange</td><td>Jamun</td></tr>
    </table>
  30. 30.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  31. 31.🔐 Is 111111 a strong or a weak password? (a) strong (b) weak
  32. 32.True or false: <input type="number"> takes only numbers. (a) False (b) True
  33. 33.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 50px;
      padding: 20px;
      border: 4px solid black;
      margin: 5px;
    }
  34. 34.🖌️ Where does the text sit on its line?
    p {
      font-size: 32px;
      background-color: orange;
      text-align: left;
      color: blue;
    }
    (a) on the right (b) in the middle (c) on the left
  35. 35.🌍 Which one is the page’s address? (a) HTTPS (b) the URL (c) the browser (d) the server
  36. 36.✍️ What is the selector in this CSS rule?
    p {
      margin: 10px;
      border: 2px solid;
      background-color: yellow;
    }
    (a) 2px solid (b) margin (c) p (d) .note
  37. 37.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
  38. 38.🔗 Where does this link open?
    <a href="games.html">About us</a>
    (a) in the same tab (b) in a new tab
  39. 39.✍️ Which property is set to 20px in this rule?
    h2 {
      font-size: 20px;
      border: 2px solid;
    }
    (a) text-align (b) 20px (c) background-color (d) font-size
  40. 40.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 10 (d) 6

Answer key

  1. 800px or wider
  2. red
  3. 228
  4. 8
  5. Space Facts
  6. background-color
  7. weak
  8. 26
  9. 39
  10. starts a new line
  11. Cricket is fun.
  12. JavaScript
  13. sits at the bottom
  14. <h1>
  15. -->
  16. 3
  17. opens it in a new tab
  18. font-style
  19. sends pages over the net
  20. No
  21. in the head
  22. 13
  23. 2
  24. <
  25. 26
  26. True
  27. 1
  28. tiger.jpg
  29. 3
  30. has a closing tag
  31. weak
  32. True
  33. 108
  34. on the left
  35. the URL
  36. p
  37. href
  38. in the same tab
  39. font-size
  40. 1

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