← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 630 · 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 of these is true of <aside>? (a) holds the logo and title (b) holds a side box of tips (c) helps you move around (d) holds the main content
  2. 2.⚖️ Which selector is the strongest? (a) a class selector (b) an element selector (c) an id selector
  3. 3.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <h2>Hello, world!</h2>
    <h2>My best friend</h2>
  4. 4.🚀 Should file names have spaces, like my page.html? (a) Yes (b) No
  5. 5.True or false: <p>Hello!</p> goes in index.html. (a) False (b) True
  6. 6.🔢 To build and share your first web page, which comes LAST? (a) test in a browser (b) write the HTML (c) publish it online (d) add CSS styles
  7. 7.🔁 What does i++ do? (a) doubles i (b) adds 1 to i (c) takes 1 from i (d) prints i
  8. 8.🎯 Which sign starts an id selector? (a) & (b) # (c) . (d) @
  9. 9.🖌️ Which CSS property makes letters bigger? (a) font-family (b) text-align (c) background-color (d) font-size
  10. 10.⚖️ 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
  11. 11.Which of these is not safe to do online? (a) tell a trusted adult (b) ask before downloading (c) share your OTP (d) use a strong password
  12. 12.🔍 Which is the odd one out? (a) changes the page live (b) makes headings and lists (c) reacts to a button click (d) shows a pop-up message
  13. 13.🌍 What is the domain name in this URL?
    http://www.example.com/index.html
    (a) http (b) /index.html (c) www.example.com (d) kids.example.org
  14. 14.True or false: alert("Hi"); goes in script.js. (a) True (b) False
  15. 15.📱 The screen is 375px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 26px;
      }
    }
    (a) Yes (b) No
  16. 16.🔁 How many times does this code print “Hello”?
    for (let i = 2; i <= 10; i++) {
      console.log("Hello");
    }
  17. 17.🔢 When you open a web page, which comes FIRST? (a) the browser shows it (b) you type the URL (c) the browser asks it (d) the server sends files
  18. 18.🖌️ Which CSS property centres a heading? (a) background-color (b) font-family (c) font-weight (d) text-align
  19. 19.Which of these is a strong password? (a) S0lar!Pen#8 (b) 123456 (c) 111111 (d) password
  20. 20.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 16px;
      }
    }
  21. 21.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Mango</td><td>Mango</td></tr>
    </table>
  22. 22.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="sport"> Kabaddi
      <input type="checkbox" name="sport"> Cricket
      <input type="checkbox" name="sport"> Hockey
      <input type="checkbox" name="sport"> Football
    </form>
  23. 23.🔗 Which address opens when you click this link?
    <a href="https://example.com">About us</a>
    (a) About us (b) https://example.com (c) maths.html (d) art.html
  24. 24.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) height (c) width (d) src
  25. 25.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>My pets</p>
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <h4>Fun facts</h4>
  26. 26.📝 What does <p> make? (a) a link (b) a table (c) a picture (d) a paragraph
  27. 27.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to load it faster (d) to make it bigger
  28. 28.⚡ Which JavaScript word makes a new variable? (a) alert() (b) console.log() (c) if (d) let
  29. 29.♿ A part of the page is under a <h4> heading. Which tag should its sub-heading use? (a) <h5> (b) <h2> (c) <h3> (d) <h4>
  30. 30.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 14px;
      }
    }
  31. 31.♿ Which link text is clearest? (a) click here (b) Read the fruit facts (c) here (d) link
  32. 32.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="200">
  33. 33.📊 Which tag makes a heading cell? (a) <caption> (b) <th> (c) <tr> (d) <td>
  34. 34.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab
  35. 35.🔐 Is password a strong or a weak password? (a) weak (b) strong
  36. 36.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 18px;
      }
    }
  37. 37.🎯 What kind of selector is #end? (a) a class selector (b) an id selector (c) an element selector
  38. 38.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 240px;
      justify-content: center;
    }
    Inside are 4 boxes, each 40px wide (no margins).
  39. 39.📱 Responsive design means a page ___. (a) is only for laptops (b) has no pictures (c) fits every screen (d) never changes
  40. 40.🚀 Which file should this code go in: console.log(5 + 2); (a) index.html (b) style.css (c) script.js

Answer key

  1. holds a side box of tips
  2. an id selector
  3. 2
  4. No
  5. True
  6. publish it online
  7. adds 1 to i
  8. #
  9. font-size
  10. the later one
  11. share your OTP
  12. makes headings and lists
  13. www.example.com
  14. True
  15. No
  16. 9
  17. you type the URL
  18. text-align
  19. S0lar!Pen#8
  20. 12
  21. 4
  22. 4
  23. https://example.com
  24. height
  25. 2
  26. a paragraph
  27. to describe the image
  28. let
  29. <h5>
  30. 16
  31. Read the fruit facts
  32. 200
  33. <th>
  34. in a new tab
  35. weak
  36. 24
  37. an id selector
  38. 40
  39. fits every screen
  40. script.js

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