← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 216 · 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 heading shows the BIGGEST text: <h2>, <h1>, <h6> or <h5>? (a) <h6> (b) <h1> (c) <h2> (d) <h5>
  2. 2.True or false: #end is an id selector. (a) True (b) False
  3. 3.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h1> or <h4>? (a) <h1> (b) <h5> (c) <h2> (d) <h4>
  4. 4.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 110px;
      justify-content: space-between;
    }
    Inside are 2 boxes, each 50px wide (no margins).
  5. 5.📱 The screen is 414px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 22px;
      }
    }
  6. 6.True or false: in <img>, src names the picture file. (a) False (b) True
  7. 7.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 310px;
      justify-content: flex-start;
    }
    Inside are 3 boxes, each 100px wide (no margins).
  8. 8.Which of these is a weak password? (a) S0lar!Pen#8 (b) abcd1234 (c) Rain#Drop_42! (d) Kite_Fl1es@Dawn
  9. 9.True or false: padding is the text or picture. (a) False (b) True
  10. 10.🎯 Which element does the selector #hero style? (a) <h1 class="hero"> (b) <h2 class="menu"> (c) <h1 id="top"> (d) <h1 id="hero">
  11. 11.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  12. 12.True or false: <input type="checkbox"> lets you tick many. (a) True (b) False
  13. 13.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
    <p>Hello, world!</p>
    (a) My pets (b) Cricket is fun. (c) Hello, world!
  14. 14.🖌️ What colour is behind the letters?
    h2 {
      text-align: left;
      background-color: red;
      font-size: 24px;
      color: green;
    }
    (a) red (b) blue (c) green
  15. 15.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  16. 16.True or false: HTML on its own can keep a high score. (a) False (b) True
  17. 17.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>The red kite</p>
    <p>Our school trip</p>
    <h2>I love mangoes.</h2>
    <h3>Rain today</h3>
  18. 18.🧭 Which semantic tag holds the main content? (a) <footer> (b) <main> (c) <header> (d) <nav>
  19. 19.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) index.html (b) My drawings (c) Riya’s Recipes (d) I like to read.
  20. 20.✍️ What value is given to width in this rule?
    .note {
      border: 2px solid;
      width: 300px;
      text-align: center;
      font-weight: bold;
    }
    (a) 300px (b) red (c) width (d) italic
  21. 21.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) A red kite (b) A tiger asleep (c) width (d) tiger.jpg
  22. 22.✍️ What value is given to font-style in this rule?
    h1 {
      width: 300px;
      font-style: italic;
      font-size: 20px;
      color: red;
    }
    (a) italic (b) red (c) font-style (d) 20px
  23. 23.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h6> or <h2>? (a) <h6> (b) <h1> (c) <h2> (d) <h5>
  24. 24.True or false: <tr> gives the table a title. (a) True (b) False
  25. 25.✍️ Which property is set to red in this rule?
    h2 {
      color: red;
      text-align: center;
    }
    (a) color (b) font-size (c) red (d) text-align
  26. 26.True or false: HTTPS scrambles data on its way. (a) True (b) False
  27. 27.♿ Who uses a screen reader? (a) people who are blind (b) only coders (c) only robots (d) only teachers
  28. 28.True or false: <ul> is an empty tag. (a) False (b) True
  29. 29.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 320px;
      justify-content: center;
    }
    Inside are 3 boxes, each 80px wide (no margins).
  30. 30.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="150">
    (a) map.png (b) width (c) Birthday cake (d) Map of India
  31. 31.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
  32. 32.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
  33. 33.🖌️ How big is the text, in px?
    h1 {
      color: red;
      background-color: purple;
      text-align: center;
      font-size: 20px;
    }
  34. 34.📱 The screen is 375px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 18px;
      }
    }
    (a) Yes (b) No
  35. 35.✍️ Which sign goes between a property and its value? (a) ; (b) - (c) : (d) =
  36. 36.📊 Where do <td> cells go? (a) inside a <p> (b) inside a <li> (c) inside the <head> (d) inside a <tr>
  37. 37.🔗 Which address opens when you click this link?
    <a href="contact.html">Contact us</a>
    (a) https://example.com (b) Contact us (c) maths.html (d) contact.html
  38. 38.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  39. 39.🔢 To build and share your first web page, which comes first: “publish it online” or “plan what to show”? (a) publish it online (b) plan what to show
  40. 40.✍️ How many declarations (property: value pairs) are in this rule?
    #top {
      width: 300px;
    }

Answer key

  1. <h1>
  2. True
  3. <h5>
  4. 10
  5. 22
  6. True
  7. 10
  8. abcd1234
  9. False
  10. <h1 id="hero">
  11. No
  12. True
  13. Cricket is fun.
  14. red
  15. a closing tag
  16. False
  17. 3
  18. <main>
  19. Riya’s Recipes
  20. 300px
  21. A tiger asleep
  22. italic
  23. <h1>
  24. False
  25. color
  26. True
  27. people who are blind
  28. False
  29. 40
  30. Map of India
  31. in the body
  32. <ul>
  33. 20
  34. No
  35. :
  36. inside a <tr>
  37. contact.html
  38. an empty tag
  39. plan what to show
  40. 1

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