← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 389 · 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.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Roses are red<br>Rivers flow</p>
  2. 2.✍️ Which sign goes between a property and its value? (a) - (b) : (c) ; (d) =
  3. 3.📊 How many cells are in each row?
    <table>
      <tr><td>Litchi</td><td>Banana</td><td>Papaya</td></tr>
      <tr><td>Banana</td><td>Banana</td><td>Jamun</td></tr>
      <tr><td>Mango</td><td>Papaya</td><td>Orange</td></tr>
      <tr><td>Grapes</td><td>Papaya</td><td>Litchi</td></tr>
    </table>
  4. 4.📦 In the box model, which part is space inside the border? (a) border (b) margin (c) content (d) padding
  5. 5.🚀 Which file should this code go in: <ul><li>Art</li></ul> (a) style.css (b) index.html (c) script.js
  6. 6.🔁 How many times does this code print “Welcome”?
    for (let i = 0; i <= 8; i++) {
      console.log("Welcome");
    }
  7. 7.🔢 In a basic web page file, which comes LAST? (a) <head> (b) <body> (c) </head> (d) </html>
  8. 8.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 150px;
      justify-content: flex-start;
    }
    Inside are 3 boxes, each 40px wide (no margins).
  9. 9.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  10. 10.What is <input type="submit"> for? (a) hides what you type (b) is for one line of words (c) sends the form (d) lets you pick only one
  11. 11.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  12. 12.True or false: a web server turns HTML into a page. (a) True (b) False
  13. 13.🌈 Which hex code is magenta? (a) #ffffff (b) #ff0000 (c) #ffff00 (d) #ff00ff
  14. 14.🔗 Which words do you click on?
    <a href="art.html">Contact us</a>
    (a) href (b) art.html (c) Visit the site (d) Contact us
  15. 15.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine<br>Sky is blue</p>
  16. 16.📱 min-width: 800px applies when the screen is ___. (a) 800px or wider (b) turned off (c) exactly 100px (d) 800px or narrower
  17. 17.✍️ What is the selector in this CSS rule?
    .note {
      color: red;
      margin: 10px;
    }
    (a) color (b) .note (c) 10px (d) #top
  18. 18.Which of these is margin? (a) the gap to other boxes (b) the text or picture (c) the gap round content (d) a solid or dotted edge
  19. 19.⚖️ What colour is the text of this element?
    <p class="big" id="end">Hi</p>
    CSS:
    .big { color: green; }
    #end { color: white; }
    p { color: red; }
    (a) green (b) white (c) purple (d) red
  20. 20.📦 In the box model, which part is the gap to other boxes? (a) content (b) padding (c) border (d) margin
  21. 21.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  22. 22.🔁 What does this code print?
    let temp = 33;
    if (temp >= 43) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Hot (b) Cool
  23. 23.Which of these is a closing tag? (a) <li> (b) <h1> (c) <p> (d) </h1>
  24. 24.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>Rain today</h2>
    <h4>Rain today</h4>
    <h3>I love mangoes.</h3>
  25. 25.🛡️ Online: is it safe to share your OTP? (a) not safe (b) safe
  26. 26.🌍 Which one sends the page back? (a) the browser (b) the URL (c) the server (d) HTTPS
  27. 27.⚡ Which JavaScript word repeats code? (a) let (b) alert() (c) console.log() (d) for
  28. 28.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 290px;
      padding: 5px;
      border: 1px solid black;
      margin: 10px;
    }
  29. 29.🎯 What kind of selector is #end? (a) a class selector (b) an element selector (c) an id selector
  30. 30.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h2> or <h6>? (a) <h2> (b) <h1> (c) <h3> (d) <h6>
  31. 31.💪 Which flexbox property sets space between boxes? (a) align-items (b) display: flex (c) flex-direction (d) gap
  32. 32.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) editor (d) address
  33. 33.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to colour it (d) to describe the image
  34. 34.True or false: in <img>, width tells which image to load. (a) True (b) False
  35. 35.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Stars shine</p>
  36. 36.🔍 Which line is missing its closing tag?
    line 1: <h1>I love mangoes.</h1>
    line 2: <em>The red kite</em>
    line 3: <h2>Good morning!
    (a) line 2 (b) line 3 (c) line 1
  37. 37.🖌️ Where does the text sit on its line?
    li {
      text-align: left;
      color: blue;
      background-color: yellow;
      font-size: 12px;
    }
    (a) in the middle (b) on the right (c) on the left
  38. 38.True or false: HTML on its own cannot make tables. (a) True (b) False
  39. 39.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  40. 40.⚖️ What colour is the text of this element?
    <p class="menu" id="intro">Hi</p>
    CSS:
    #intro { color: green; }
    #intro { color: orange; }
    (a) green (b) black (c) orange (d) purple

Answer key

  1. 3
  2. :
  3. 3
  4. padding
  5. index.html
  6. 9
  7. </html>
  8. 30
  9. No
  10. sends the form
  11. an empty tag
  12. False
  13. #ff00ff
  14. Contact us
  15. 3
  16. 800px or wider
  17. .note
  18. the gap to other boxes
  19. white
  20. margin
  21. a closing tag
  22. Cool
  23. </h1>
  24. 4
  25. not safe
  26. the server
  27. for
  28. 302
  29. an id selector
  30. <h6>
  31. gap
  32. element
  33. to describe the image
  34. False
  35. 2
  36. line 3
  37. on the left
  38. False
  39. has a closing tag
  40. orange

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