← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 107 · 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 element does the selector .big style? (a) <h2 class="red"> (b) <li class="box"> (c) <h2 id="big"> (d) <h2 class="big">
  2. 2.🎨 Which tag connects an outside CSS file? (a) <img> (b) <a> (c) <link> (d) <css>
  3. 3.🚀 Which file should this code go in: <p>Hello!</p> (a) index.html (b) style.css (c) script.js
  4. 4.🌗 Is red on green easy or hard to read? (a) easy to read (b) hard to read
  5. 5.True or false: HTML on its own can make links to pages. (a) False (b) True
  6. 6.✍️ How many declarations (property: value pairs) are in this rule?
    h1 {
      text-align: center;
      color: red;
      font-size: 20px;
      margin: 10px;
    }
  7. 7.🔍 Which line is missing its closing tag?
    line 1: <strong>Good morning!</strong>
    line 2: <p>Fun facts</p>
    line 3: <i>Cricket is fun.
    (a) line 3 (b) line 2 (c) line 1
  8. 8.🧭 How many <main> parts should a page have? (a) ten (b) one (c) none (d) three
  9. 9.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 6; i++) {
      total = total + i;
    }
    console.log(total);
  10. 10.True or false: margin is the gap to other boxes. (a) False (b) True
  11. 11.⚖️ What colour is the text of this element?
    <h1 class="big" id="logo">Hi</h1>
    CSS:
    .big { color: yellow; }
    #logo { color: red; }
    h1 { color: black; }
    (a) yellow (b) black (c) red (d) orange
  12. 12.What does justify-content: flex-start do? (a) packs boxes at the start (b) equal gaps, none at ends (c) puts boxes in the middle (d) packs boxes at the end
  13. 13.📱 The screen is 540px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 6px;
      }
    }
    (a) Yes (b) No
  14. 14.Which of these does JavaScript do? (a) makes a link (b) reacts to a button click (c) puts a picture on a page (d) makes headings and lists
  15. 15.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 12px;
      }
    }
  16. 16.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Grapes</td><td>Papaya</td><td>Orange</td></tr>
      <tr><td>Mango</td><td>Guava</td><td>Banana</td></tr>
      <tr><td>Papaya</td><td>Grapes</td><td>Mango</td></tr>
    </table>
  17. 17.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h2> or <h3>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
  18. 18.True or false: <header> sits at the very top. (a) False (b) True
  19. 19.📊 Which tag makes one data cell? (a) <table> (b) <td> (c) <caption> (d) <th>
  20. 20.🔍 Which is the odd one out? (a) puts a picture on a page (b) makes a form box (c) makes headings and lists (d) rounds box corners
  21. 21.💪 Which flexbox property turns on flexbox? (a) display: flex (b) justify-content (c) align-items (d) gap
  22. 22.🖌️ What colour are the letters?
    li {
      color: purple;
      text-align: right;
      font-size: 12px;
      background-color: green;
    }
    (a) green (b) purple (c) yellow
  23. 23.🎯 Which element does the selector div style? (a) <span> (b) <div class="star"> (c) <p class="star"> (d) <h1 id="main">
  24. 24.Which of these does JavaScript do? (a) counts down a timer (b) gives the page structure (c) changes the text size (d) sets colours and fonts
  25. 25.🌗 Is white on black easy or hard to read? (a) easy to read (b) hard to read
  26. 26.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  27. 27.🖌️ Which CSS property picks the font style? (a) font-family (b) background-color (c) text-align (d) font-weight
  28. 28.📦 In the box model, which part is space outside the border? (a) content (b) margin (c) padding (d) border
  29. 29.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="300">
  30. 30.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
  31. 31.🎯 What kind of selector is #main? (a) an element selector (b) a class selector (c) an id selector
  32. 32.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Guava</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
  33. 33.🌍 What do we call the computer that stores a website? (a) a mouse (b) a server (c) a keyboard (d) a printer
  34. 34.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="250">
    (a) fort.jpg (b) An old fort (c) tiger.jpg (d) kite.png
  35. 35.🔢 In a basic web page file, which comes first: “</html>” or “</head>”? (a) </head> (b) </html>
  36. 36.🔗 Which address opens when you click this link?
    <a href="art.html">Contact us</a>
    (a) news.html (b) quiz.html (c) art.html (d) Contact us
  37. 37.📊 In a table, which tag is a row? (a) <th> (b) <tr> (c) <tb> (d) <td>
  38. 38.🎯 Which element does the selector .star style? (a) <h2 class="menu"> (b) <h2 class="star"> (c) <li class="note"> (d) <h2 id="star">
  39. 39.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 240px;
      padding: 5px;
      border: 4px solid black;
      margin: 20px;
    }
  40. 40.🌈 Which colour of light is strongest in rgb(3, 121, 215)? (a) blue (b) red (c) green

Answer key

  1. <h2 class="big">
  2. <link>
  3. index.html
  4. hard to read
  5. True
  6. 4
  7. line 3
  8. one
  9. 21
  10. True
  11. red
  12. packs boxes at the start
  13. No
  14. reacts to a button click
  15. 12
  16. 3
  17. <h4>
  18. True
  19. <td>
  20. rounds box corners
  21. display: flex
  22. purple
  23. <div class="star">
  24. counts down a timer
  25. easy to read
  26. in the body
  27. font-family
  28. margin
  29. 300
  30. <ul>
  31. an id selector
  32. 6
  33. a server
  34. fort.jpg
  35. </head>
  36. art.html
  37. <tr>
  38. <h2 class="star">
  39. 258
  40. blue

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