← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 772 · 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 number does this code print?
    let total = 0;
    for (let i = 1; i <= 5; i++) {
      total = total + 4;
    }
    console.log(total);
  2. 2.🌐 Which one opens web pages for us? (a) a web browser (b) a web server (c) a code editor
  3. 3.♿ Does this help everyone, or make the page harder to use: add alt text to images? (a) helps everyone (b) makes it harder
  4. 4.✍️ Which property is set to 300px in this rule?
    body {
      text-align: center;
      width: 300px;
      margin: 10px;
    }
    (a) color (b) width (c) font-style (d) 300px
  5. 5.🧩 Which language reacts to a button click? (a) HTML (b) JavaScript (c) CSS
  6. 6.🎯 What kind of selector is body? (a) a class selector (b) an element selector (c) an id selector
  7. 7.True or false: JavaScript reacts to a button click. (a) False (b) True
  8. 8.📄 Which part holds everything you see on the page? (a) the head (b) the body (c) the title (d) the doctype
  9. 9.🚀 Which file should this code go in: let score = 0; (a) style.css (b) index.html (c) script.js
  10. 10.✍️ Which sign goes between a property and its value? (a) ; (b) = (c) : (d) -
  11. 11.📝 Which input type is for an email address? (a) number (b) password (c) submit (d) email
  12. 12.Which of these is margin? (a) space inside the border (b) the gap to other boxes (c) the line round the box (d) a solid or dotted edge
  13. 13.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
  14. 14.🔗 Which address opens when you click this link?
    <a href="https://example.com">About us</a>
    (a) https://example.com (b) About us (c) maths.html (d) art.html
  15. 15.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Mango</li>
    </ol>
  16. 16.🚀 You change your code. What should you do to see the change? (a) save and refresh (b) switch off the PC (c) delete the file (d) rename the folder
  17. 17.🔐 Is riya2014 a strong or a weak password? (a) strong (b) weak
  18. 18.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
  19. 19.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <p>Rain today</p>
    (a) Cricket is fun. (b) Fun facts (c) My best friend (d) Rain today
  20. 20.🔢 On a typical page, from top to bottom, which comes FIRST? (a) <header> (b) <nav> (c) <footer> (d) <main>
  21. 21.🔁 How many times does this code print “Welcome”?
    for (let i = 2; i <= 9; i++) {
      console.log("Welcome");
    }
  22. 22.🔗 Where does this link open?
    <a href="https://example.com">Play games</a>
    (a) in the same tab (b) in a new tab
  23. 23.What does font-size do? (a) sets the letter colour (b) centres a heading (c) makes letters bigger (d) colours behind the text
  24. 24.True or false: #end is an element selector. (a) False (b) True
  25. 25.True or false: margin is the text or picture. (a) True (b) False
  26. 26.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <a> (d) <pic>
  27. 27.🧭 Who is helped most by semantic tags? (a) screen-reader users (b) only the server (c) nobody (d) only the printer
  28. 28.🔗 Which words do you click on?
    <a href="https://example.com">Maths fun</a>
    (a) https://example.com (b) href (c) Maths fun (d) Art corner
  29. 29.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 270px;
      padding: 15px;
      border: 4px solid black;
      margin: 10px;
    }
  30. 30.Which of these is a closing tag? (a) <title> (b) <li> (c) <h1> (d) </body>
  31. 31.Which of these is not safe to do online? (a) share your password (b) use a nickname in games (c) ask before downloading (d) check for https first
  32. 32.Which of these does JavaScript do? (a) lays out the page (b) sets colours and fonts (c) reacts to a button click (d) makes a form box
  33. 33.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 30px;
      }
    }
  34. 34.📱 Which tag helps phones show a page at the right size? (a) the br tag (b) the title tag (c) the viewport meta tag (d) the hr tag
  35. 35.🌈 Which colour is #ffff00? (a) magenta (b) black (c) white (d) yellow
  36. 36.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) click it twice (b) close it, tell an adult (c) type the password (d) share it with friends
  37. 37.📊 How many cells does this table have in all?
    <table>
      <tr><td>Orange</td><td>Grapes</td></tr>
      <tr><td>Jamun</td><td>Litchi</td></tr>
      <tr><td>Orange</td><td>Grapes</td></tr>
      <tr><td>Mango</td><td>Guava</td></tr>
    </table>
  38. 38.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 4; i++) {
      total = total + 3;
    }
    console.log(total);
  39. 39.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h4> or <h1>? (a) <h4> (b) <h5> (c) <h3> (d) <h1>
  40. 40.🚀 Should file names have spaces, like my page.html? (a) Yes (b) No

Answer key

  1. 20
  2. a web browser
  3. helps everyone
  4. width
  5. JavaScript
  6. an element selector
  7. True
  8. the body
  9. script.js
  10. :
  11. email
  12. the gap to other boxes
  13. <ol>
  14. https://example.com
  15. 2
  16. save and refresh
  17. weak
  18. F
  19. Fun facts
  20. <header>
  21. 8
  22. in the same tab
  23. makes letters bigger
  24. False
  25. False
  26. <img>
  27. screen-reader users
  28. Maths fun
  29. 308
  30. </body>
  31. share your password
  32. reacts to a button click
  33. 24
  34. the viewport meta tag
  35. yellow
  36. close it, tell an adult
  37. 8
  38. 12
  39. <h1>
  40. No

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