← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 869 · 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.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 16; i = i + 3) {
      console.log(i);
    }
  2. 2.📊 How many cells are in each row?
    <table>
      <tr><td>Jamun</td><td>Papaya</td><td>Litchi</td></tr>
      <tr><td>Jamun</td><td>Guava</td><td>Jamun</td></tr>
      <tr><td>Guava</td><td>Grapes</td><td>Mango</td></tr>
    </table>
  3. 3.🔍 One closing tag is missing. Which one?
    <p>The red kite</p>
    <small>Cricket is fun.</small>
    <h1>My best friend
    (a) </small> (b) </em> (c) </h1> (d) </p>
  4. 4.📋 Does this list show bullets or numbers?
    <ol>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>
    (a) bullets (b) numbers
  5. 5.🔁 How many times does this code print “Welcome”?
    for (let i = 0; i <= 5; i++) {
      console.log("Welcome");
    }
  6. 6.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Litchi</td><td>Papaya</td><td>Orange</td></tr>
      <tr><td>Orange</td><td>Mango</td><td>Guava</td></tr>
    </table>
  7. 7.🔗 Where does this link open?
    <a href="games.html">School news</a>
    (a) in a new tab (b) in the same tab
  8. 8.♿ Does this help everyone, or make the page harder to use: add alt text to images? (a) helps everyone (b) makes it harder
  9. 9.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h3>Hello, world!</h3>
    <p>Rain today</p>
    <p>Fun facts</p>
  10. 10.True or false: #hero is a class selector. (a) False (b) True
  11. 11.True or false: <td> makes one table row. (a) False (b) True
  12. 12.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 14px;
      }
    }
  13. 13.🧭 Which semantic tag holds a side box of tips? (a) <footer> (b) <article> (c) <aside> (d) <header>
  14. 14.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
  15. 15.Which of these is true of a web browser? (a) saves our .html files (b) has an address bar (c) sends pages over the net (d) colours code to help us
  16. 16.🚀 Which file should this code go in: <img src="cat.png"> (a) script.js (b) style.css (c) index.html
  17. 17.Which of these is an empty tag? (a) <b> (b) <ul> (c) <br> (d) <p>
  18. 18.Which of these is true of <main>? (a) holds the logo and title (b) sits at the bottom (c) helps you move around (d) holds the main content
  19. 19.🚀 Which tag loads script.js into a page? (a) <a href="script.js"> (b) <script src="script.js"> (c) <js src="script.js"> (d) <link script.js>
  20. 20.🎨 A CSS file usually ends with which extension? (a) .js (b) .html (c) .css (d) .png
  21. 21.True or false: #top { color: blue; } goes in style.css. (a) False (b) True
  22. 22.Which of these does JavaScript do? (a) shows a pop-up message (b) makes a link (c) sets colours and fonts (d) makes headings and lists
  23. 23.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  24. 24.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) id (d) src
  25. 25.💪 Which flexbox property picks row or column? (a) display: flex (b) align-items (c) flex-direction (d) justify-content
  26. 26.⚡ A JavaScript file usually ends with which extension? (a) .js (b) .css (c) .jpg (d) .html
  27. 27.🔢 On a typical page, from top to bottom, what comes right after “<nav>”? (a) <main> (b) <header> (c) <footer>
  28. 28.✍️ What value is given to color in this rule?
    h1 {
      font-style: italic;
      color: red;
    }
    (a) 20px (b) color (c) red (d) center
  29. 29.✍️ How many declarations (property: value pairs) are in this rule?
    body {
      text-align: center;
    }
  30. 30.🔢 To build and share your first web page, which comes first: “write the HTML” or “publish it online”? (a) publish it online (b) write the HTML
  31. 31.True or false: <style> goes in the body. (a) True (b) False
  32. 32.Which of these does JavaScript do? (a) makes headings and lists (b) counts down a timer (c) sets colours and fonts (d) adds space around boxes
  33. 33.Which of these is safe to do online? (a) post your home address (b) ask before downloading (c) share your OTP (d) download from pop-ups
  34. 34.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
  35. 35.🌗 Is yellow on white easy or hard to read? (a) easy to read (b) hard to read
  36. 36.✍️ How many declarations (property: value pairs) are in this rule?
    li {
      font-size: 20px;
      color: red;
      width: 300px;
    }
  37. 37.✍️ Which property is set to red in this rule?
    .note {
      font-size: 20px;
      background-color: yellow;
      color: red;
    }
    (a) text-align (b) color (c) red (d) font-size
  38. 38.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 6px;
      }
    }
  39. 39.🔍 One closing tag is missing. Which one?
    <h1>Cricket is fun.
    <u>I love mangoes.</u>
    <p>My pets</p>
    (a) </u> (b) </h1> (c) </h2> (d) </p>
  40. 40.🖌️ What colour is behind the letters?
    p {
      font-size: 32px;
      background-color: black;
      color: yellow;
      text-align: right;
    }
    (a) yellow (b) red (c) black

Answer key

  1. 15
  2. 3
  3. </h1>
  4. numbers
  5. 6
  6. 3
  7. in the same tab
  8. helps everyone
  9. 2
  10. False
  11. False
  12. 14
  13. <aside>
  14. Yes
  15. has an address bar
  16. index.html
  17. <br>
  18. holds the main content
  19. <script src="script.js">
  20. .css
  21. True
  22. shows a pop-up message
  23. <ol>
  24. href
  25. flex-direction
  26. .js
  27. <main>
  28. red
  29. 1
  30. write the HTML
  31. False
  32. counts down a timer
  33. ask before downloading
  34. red
  35. hard to read
  36. 3
  37. color
  38. 6
  39. </h1>
  40. black

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