← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 663 · 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 JavaScript word makes a new variable? (a) console.log() (b) for (c) let (d) if
  2. 2.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  3. 3.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="300">
    (a) Map of India (b) Birthday cake (c) width (d) map.png
  4. 4.True or false: <th> gives the table a title. (a) False (b) True
  5. 5.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Visit the site</a>
    (a) in the same tab (b) in a new tab
  6. 6.🖌️ Which CSS property makes the text bold? (a) font-family (b) font-size (c) font-weight (d) background-color
  7. 7.📱 The screen is 375px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 18px;
      }
    }
    (a) Yes (b) No
  8. 8.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  9. 9.✍️ Which property is set to 20px in this rule?
    .box {
      font-style: italic;
      margin: 10px;
      font-size: 20px;
      border: 2px solid;
    }
    (a) font-size (b) 20px (c) text-align (d) background-color
  10. 10.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to colour it (d) to describe the image
  11. 11.🔠 Are headings shown in bold by default? (a) Yes (b) No
  12. 12.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h6>? (a) <h2> (b) <h6> (c) <h3> (d) <h1>
  13. 13.What is <input type="radio"> for? (a) is for an email address (b) sends the form (c) lets you pick only one (d) takes only numbers
  14. 14.🔁 What does this code print?
    let marks = 8;
    if (marks < 6) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Try again (b) Pass
  15. 15.🖼️ Which attribute of <img> describes the picture? (a) alt (b) height (c) src (d) width
  16. 16.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a slash / (d) a dot .
  17. 17.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Hello, world!</p>
    <p>Fun facts</p>
  18. 18.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
  19. 19.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) red (d) black
  20. 20.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 28px;
      }
    }
  21. 21.🔗 Which address opens when you click this link?
    <a href="https://example.com">About us</a>
    (a) About us (b) art.html (c) https://example.com (d) maths.html
  22. 22.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
  23. 23.🎯 Which element does the selector p style? (a) <p class="menu"> (b) <h1> (c) <li id="top"> (d) <h2 class="menu">
  24. 24.🖌️ Which CSS property colours behind the text? (a) background-color (b) font-family (c) font-size (d) color
  25. 25.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Our school trip</p>
    <h2>Our school trip</h2>
    <h4>Rain today</h4>
    <p>Our school trip</p>
  26. 26.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) at the bottom (d) nowhere
  27. 27.🌍 What is the protocol in this URL?
    http://kids.example.org/index.html
    (a) https (b) http (c) kids.example.org (d) /index.html
  28. 28.🎨 Which attribute adds CSS inside one tag? (a) src (b) style (c) alt (d) href
  29. 29.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 26px;
      }
    }
  30. 30.🎯 Which CSS selector matches this element?
    <p class="note" id="top">Hello</p>
    (a) .big (b) .note (c) #note (d) .top
  31. 31.True or false: <input type="submit"> sends the form. (a) True (b) False
  32. 32.📝 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"> Chess
      <input type="checkbox" name="sport"> Football
    </form>
  33. 33.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>Fun facts</h4>
    <p>Our school trip</p>
  34. 34.✍️ What value is given to font-style in this rule?
    p {
      background-color: yellow;
      width: 300px;
      font-style: italic;
      font-size: 20px;
    }
    (a) font-style (b) 20px (c) red (d) italic
  35. 35.True or false: <h1> has a closing tag. (a) True (b) False
  36. 36.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) href (b) About us (c) Play games (d) games.html
  37. 37.🌈 Which colour of light is strongest in rgb(241, 32, 119)? (a) blue (b) green (c) red
  38. 38.📊 Which tag makes a heading cell? (a) <caption> (b) <th> (c) <tr> (d) <td>
  39. 39.True or false: body is a class selector. (a) False (b) True
  40. 40.True or false: <b> is an empty tag. (a) True (b) False

Answer key

  1. let
  2. Yes
  3. Map of India
  4. False
  5. in a new tab
  6. font-weight
  7. No
  8. has a closing tag
  9. font-size
  10. to describe the image
  11. Yes
  12. <h6>
  13. lets you pick only one
  14. Try again
  15. alt
  16. a slash /
  17. 1
  18. False
  19. red
  20. 20
  21. https://example.com
  22. 1
  23. <p class="menu">
  24. background-color
  25. 3
  26. on the browser tab
  27. http
  28. style
  29. 24
  30. .note
  31. True
  32. 3
  33. 2
  34. italic
  35. True
  36. Play games
  37. red
  38. <th>
  39. False
  40. False

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