← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 177 · 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.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="350">
  2. 2.🌈 Which colour of light is strongest in rgb(140, 168, 9)? (a) green (b) red (c) blue
  3. 3.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Jamun</td><td>Guava</td><td>Papaya</td></tr>
    </table>
  4. 4.⚖️ What colour is the text of this element?
    <h2 class="menu" id="logo">Hi</h2>
    CSS:
    #logo { color: yellow; }
    #logo { color: green; }
    (a) yellow (b) blue (c) green (d) white
  5. 5.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 8px;
      }
    }
  6. 6.📊 How many rows does this table have?
    <table>
      <tr><td>Grapes</td><td>Jamun</td></tr>
      <tr><td>Mango</td><td>Guava</td></tr>
    </table>
  7. 7.🌗 Is white on black easy or hard to read? (a) easy to read (b) hard to read
  8. 8.🧩 Which language makes a link? (a) JavaScript (b) HTML (c) CSS
  9. 9.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  10. 10.🧩 Which language gives the page structure? (a) CSS (b) JavaScript (c) HTML
  11. 11.True or false: <input> has a closing tag. (a) True (b) False
  12. 12.✍️ How does a CSS comment start? (a) <!-- (b) # (c) /* (d) //
  13. 13.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>Cricket is fun.</h2>
    <h2>Hello, world!</h2>
  14. 14.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Birds sing<br>Stars shine</p>
  15. 15.True or false: <h1> goes in the body. (a) False (b) True
  16. 16.🛡️ Online: is it safe to share your OTP? (a) not safe (b) safe
  17. 17.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 150px;
      padding: 30px;
      border: 1px solid black;
      margin: 5px;
    }
  18. 18.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 240px;
      justify-content: center;
    }
    Inside are 2 boxes, each 100px wide (no margins).
  19. 19.Which of these is a strong password? (a) riya2014 (b) abcd1234 (c) Chai$Cup_19x (d) password
  20. 20.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 180px;
      justify-content: flex-end;
    }
    Inside are 3 boxes, each 40px wide (no margins).
  21. 21.Which of these is an empty tag? (a) <ul> (b) <p> (c) <br> (d) <b>
  22. 22.True or false: “write clear link text” makes the page harder to use. (a) False (b) True
  23. 23.Which of these is true of a web browser? (a) hosts websites online (b) answers page requests (c) colours code to help us (d) opens web pages for us
  24. 24.🌍 What is the path in this URL?
    http://kids.example.org/news/today.html
    (a) kids.example.org (b) http (c) /news/today.html (d) /games/chess.html
  25. 25.🖌️ What colour are the letters?
    p {
      color: yellow;
      background-color: green;
      font-size: 32px;
      text-align: right;
    }
    (a) black (b) green (c) yellow
  26. 26.📝 Which input type picks a day? (a) submit (b) password (c) number (d) date
  27. 27.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 7; i++) {
      total = total + 3;
    }
    console.log(total);
  28. 28.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  29. 29.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="colour"> Green
      <input type="radio" name="colour"> Red
      <input type="radio" name="colour"> Orange
    </form>
  30. 30.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h2>The red kite</h2>
    <p>Our school trip</p>
    <p>Fun facts</p>
  31. 31.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to describe the image (d) to load it faster
  32. 32.What does background-color do? (a) sets the letter colour (b) makes letters bigger (c) colours behind the text (d) picks the font style
  33. 33.🚀 Which file should this code go in: alert("Hi"); (a) script.js (b) index.html (c) style.css
  34. 34.Which of these is not safe to do online? (a) keep passwords secret (b) share your OTP (c) tell a trusted adult (d) think before you post
  35. 35.🔢 To build and share your first web page, which comes first: “write the HTML” or “publish it online”? (a) publish it online (b) write the HTML
  36. 36.What is <input type="text"> for? (a) takes only numbers (b) is for one line of words (c) is for an email address (d) lets you pick only one
  37. 37.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the later one (b) the shorter one (c) neither (d) the first one
  38. 38.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) opens it in a new tab (d) hides the link
  39. 39.True or false: HTML gives the page structure. (a) False (b) True
  40. 40.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Fun facts</p>
    <h2>Hello, world!</h2>
    <p>Cricket is fun.</p>
    <h2>I love mangoes.</h2>
    <p>Rain today</p>

Answer key

  1. 350
  2. green
  3. 2
  4. green
  5. 8
  6. 2
  7. easy to read
  8. HTML
  9. an opening tag
  10. HTML
  11. False
  12. /*
  13. 1
  14. 3
  15. True
  16. not safe
  17. 212
  18. 20
  19. Chai$Cup_19x
  20. 60
  21. <br>
  22. False
  23. opens web pages for us
  24. /news/today.html
  25. yellow
  26. date
  27. 21
  28. an opening tag
  29. 1
  30. 2
  31. to describe the image
  32. colours behind the text
  33. script.js
  34. share your OTP
  35. write the HTML
  36. is for one line of words
  37. the later one
  38. opens it in a new tab
  39. True
  40. 4

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