← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 262 · 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.🔁 How many times does this code print “Welcome”?
    for (let i = 2; i < 4; i++) {
      console.log("Welcome");
    }
  2. 2.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Guava</td><td>Jamun</td><td>Mango</td><td>Litchi</td></tr>
    </table>
  3. 3.🌈 In #00fe00 the green part is the hex number fe. What is it as a normal number?
  4. 4.✍️ In color: blue; which part is the value? (a) : (b) blue (c) color (d) ;
  5. 5.✍️ What value is given to padding in this rule?
    .box {
      border: 2px solid;
      padding: 8px;
    }
    (a) padding (b) 8px (c) 2px solid (d) bold
  6. 6.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Good morning!</p>
  7. 7.Which of these is not safe to do online? (a) tell a trusted adult (b) use a nickname in games (c) share your OTP (d) think before you post
  8. 8.🌈 In #00000a the blue part is the hex number 0a. What is it as a normal number?
  9. 9.🔁 What does i++ do? (a) doubles i (b) takes 1 from i (c) prints i (d) adds 1 to i
  10. 10.📝 Which input type is for one line of words? (a) radio (b) text (c) submit (d) password
  11. 11.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
  12. 12.🎯 Which CSS selector matches this element?
    <p class="red" id="main">Hello</p>
    (a) .main (b) .box (c) #main (d) #red
  13. 13.🛡️ Online: is it safe to download from pop-ups? (a) safe (b) not safe
  14. 14.🔗 Which words do you click on?
    <a href="art.html">About us</a>
    (a) About us (b) href (c) art.html (d) Contact us
  15. 15.Which of these is a weak password? (a) 123456 (b) Kite_Fl1es@Dawn (c) Rain#Drop_42! (d) Blue@Tiger_74
  16. 16.✍️ How many declarations (property: value pairs) are in this rule?
    li {
      margin: 10px;
      font-weight: bold;
      color: red;
    }
  17. 17.🎨 One CSS file can style how many pages? (a) only one image (b) only one word (c) many pages (d) no pages
  18. 18.✍️ Which property is set to bold in this rule?
    h1 {
      background-color: yellow;
      font-weight: bold;
    }
    (a) font-weight (b) border (c) bold (d) width
  19. 19.⚖️ What colour is the text of this element?
    <h1 class="menu" id="end">Hi</h1>
    CSS:
    h1 { color: blue; }
    #end { color: orange; }
    (a) orange (b) purple (c) white (d) blue
  20. 20.🚀 Which file should this code go in: score = score + 1; (a) index.html (b) script.js (c) style.css
  21. 21.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) <!DOCTYPE html> (c) </body> (d) </html>
  22. 22.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Rain today</p> -->
    <p>Our school trip</p>
    (a) Rain today (b) The red kite (c) Our school trip
  23. 23.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h3>Cricket is fun.</h3>
    <h3>Rain today</h3>
    <p>Cricket is fun.</p>
  24. 24.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <h1> (d) <title>
  25. 25.🔍 Which line is missing its closing tag?
    line 1: <b>Rain today</b>
    line 2: <u>Hello, world!</u>
    line 3: <h1>Cricket is fun.
    (a) line 2 (b) line 3 (c) line 1
  26. 26.🎯 What kind of selector is img? (a) an id selector (b) an element selector (c) a class selector
  27. 27.🌐 Which one answers page requests? (a) a web browser (b) a web server (c) a code editor
  28. 28.✍️ Which sign goes between a property and its value? (a) - (b) : (c) ; (d) =
  29. 29.🎯 What kind of selector is .menu? (a) an id selector (b) an element selector (c) a class selector
  30. 30.📦 In the box model, which part is space inside the border? (a) padding (b) content (c) border (d) margin
  31. 31.True or false: the browser asks for a web page. (a) False (b) True
  32. 32.🎯 What kind of selector is .card? (a) an id selector (b) an element selector (c) a class selector
  33. 33.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <ul> (d) <br>
  34. 34.🖌️ Where does the text sit on its line?
    li {
      color: orange;
      background-color: yellow;
      text-align: left;
      font-size: 20px;
    }
    (a) in the middle (b) on the right (c) on the left
  35. 35.🎯 Which CSS selector matches this element?
    <p class="star" id="end">Hello</p>
    (a) h1 (b) #star (c) .end (d) p
  36. 36.🔁 How many numbers does this code print?
    for (let i = 0; i < 14; i = i + 4) {
      console.log(i);
    }
  37. 37.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 300px;
      justify-content: flex-end;
    }
    Inside are 4 boxes, each 60px wide (no margins).
  38. 38.What does color do? (a) centres a heading (b) makes letters bigger (c) makes the text bold (d) sets the letter colour
  39. 39.💪 Which justify-content value puts boxes in the middle? (a) flex-start (b) space-between (c) center (d) flex-end
  40. 40.🚀 You change your code. What should you do to see the change? (a) delete the file (b) save and refresh (c) switch off the PC (d) rename the folder

Answer key

  1. 2
  2. 2
  3. 254
  4. blue
  5. 8px
  6. 1
  7. share your OTP
  8. 10
  9. adds 1 to i
  10. text
  11. 4
  12. #main
  13. not safe
  14. About us
  15. 123456
  16. 3
  17. many pages
  18. font-weight
  19. orange
  20. script.js
  21. <!DOCTYPE html>
  22. Rain today
  23. 3
  24. <h1>
  25. line 3
  26. an element selector
  27. a web server
  28. :
  29. a class selector
  30. padding
  31. True
  32. a class selector
  33. <ol>
  34. on the left
  35. p
  36. 4
  37. 60
  38. sets the letter colour
  39. center
  40. save and refresh

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