← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 720 · 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 text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    <p>Fun facts</p>
    (a) Fun facts (b) The red kite (c) My pets
  2. 2.True or false: the border is a solid or dotted edge. (a) True (b) False
  3. 3.⚡ What does JavaScript add to a web page? (a) only colours (b) the domain name (c) actions and changes (d) the page title
  4. 4.🔗 Which address opens when you click this link?
    <a href="games.html">Visit the site</a>
    (a) about.html (b) Visit the site (c) games.html (d) contact.html
  5. 5.🖌️ What colour are the letters?
    h2 {
      background-color: purple;
      text-align: center;
      font-size: 28px;
      color: green;
    }
    (a) green (b) blue (c) purple
  6. 6.True or false: a web server is where we type code. (a) False (b) True
  7. 7.🔢 When you open a web page, which comes LAST? (a) the browser shows it (b) DNS finds the server (c) the browser asks it (d) the server sends files
  8. 8.📊 How many cells does this table have in all?
    <table>
      <tr><td>Guava</td><td>Guava</td><td>Orange</td></tr>
      <tr><td>Orange</td><td>Orange</td><td>Mango</td></tr>
      <tr><td>Guava</td><td>Banana</td><td>Jamun</td></tr>
    </table>
  9. 9.🌍 What is the protocol in this URL?
    http://kids.example.org/maths/tables.html
    (a) /maths/tables.html (b) http (c) kids.example.org (d) https
  10. 10.🚀 Which tag loads script.js into a page? (a) <js src="script.js"> (b) <script src="script.js"> (c) <a href="script.js"> (d) <link script.js>
  11. 11.True or false: CSS rounds box corners. (a) False (b) True
  12. 12.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) < (d) [
  13. 13.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) All about me (b) index.html (c) Thanks for visiting. (d) Cricket Club
  14. 14.📱 The screen is 1366px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 16px;
      }
    }
    (a) Yes (b) No
  15. 15.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Banana</li>
    </ol>
  16. 16.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 50px;
      padding: 5px;
      border: 1px solid black;
      margin: 0px;
    }
  17. 17.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 140px;
      padding: 5px;
      border: 3px solid black;
      margin: 5px;
    }
  18. 18.Which of these is padding? (a) a solid or dotted edge (b) the gap to other boxes (c) the gap round content (d) space outside the border
  19. 19.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <!DOCTYPE html> (d) <body>
  20. 20.📊 In a table, which tag is a row? (a) <tr> (b) <td> (c) <tb> (d) <th>
  21. 21.🚀 Which file should this code go in: score = score + 1; (a) style.css (b) index.html (c) script.js
  22. 22.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h4> or <h1>? (a) <h1> (b) <h4> (c) <h5> (d) <h2>
  23. 23.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 280px;
      padding: 15px;
      border: 3px solid black;
      margin: 15px;
    }
  24. 24.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="250">
    (a) map.png (b) width (c) Map of India (d) Birthday cake
  25. 25.♿ Does this help everyone, or make the page harder to use: label every form box? (a) helps everyone (b) makes it harder
  26. 26.🌍 Which one shows the page to you? (a) HTTPS (b) the server (c) the browser (d) the URL
  27. 27.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
    <p>My best friend</p>
  28. 28.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>Good morning!</p> -->
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Good morning! (c) Our school trip
  29. 29.🌐 Which one shows line numbers? (a) a code editor (b) a web browser (c) a web server
  30. 30.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 12px;
      }
    }
  31. 31.🔁 How many numbers does this code print?
    for (let i = 0; i < 8; i = i + 2) {
      console.log(i);
    }
  32. 32.⚖️ What colour is the text of this element?
    <p class="red" id="end">Hi</p>
    CSS:
    p { color: purple; }
    #end { color: yellow; }
    (a) purple (b) orange (c) yellow (d) red
  33. 33.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h1> or <h4>? (a) <h4> (b) <h2> (c) <h3> (d) <h1>
  34. 34.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 490px;
      justify-content: space-between;
    }
    Inside are 4 boxes, each 100px wide (no margins).
  35. 35.True or false: “use big enough text” makes the page harder to use. (a) False (b) True
  36. 36.🔗 Where does this link open?
    <a href="games.html">Art corner</a>
    (a) in the same tab (b) in a new tab
  37. 37.✍️ What value is given to color in this rule?
    .note {
      font-style: italic;
      color: red;
      text-align: center;
      padding: 8px;
    }
    (a) color (b) center (c) 20px (d) red
  38. 38.🎯 How many elements on a page should have the same id? (a) any number (b) 2 (c) 1 (d) 5
  39. 39.True or false: HTML on its own cannot run a game loop. (a) False (b) True
  40. 40.📱 The screen is 320px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 6px;
      }
    }
    (a) Yes (b) No

Answer key

  1. My pets
  2. True
  3. actions and changes
  4. games.html
  5. green
  6. False
  7. the browser shows it
  8. 9
  9. http
  10. <script src="script.js">
  11. True
  12. <
  13. Cricket Club
  14. Yes
  15. 4
  16. 62
  17. 166
  18. the gap round content
  19. <!DOCTYPE html>
  20. <tr>
  21. script.js
  22. <h5>
  23. 346
  24. Map of India
  25. helps everyone
  26. the browser
  27. 2
  28. Good morning!
  29. a code editor
  30. 12
  31. 4
  32. yellow
  33. <h1>
  34. 30
  35. False
  36. in the same tab
  37. red
  38. 1
  39. True
  40. Yes

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