← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 647 · 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.📦 In the box model, which part is the text or picture? (a) border (b) padding (c) content (d) margin
  2. 2.✍️ CSS declarations go inside which brackets? (a) [ ] (b) ( ) (c) < > (d) { }
  3. 3.🎯 How many elements on a page should have the same id? (a) 2 (b) 5 (c) 1 (d) any number
  4. 4.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) body (b) All about me (c) My Hobbies (d) Try this poha.
  5. 5.🌈 Which hex code is bright green? (a) #000000 (b) #ff0000 (c) #00ff00 (d) #0000ff
  6. 6.⚖️ What colour is the text of this element?
    <h2 class="big" id="top">Hi</h2>
    CSS:
    #top { color: purple; }
    h2 { color: black; }
    .big { color: white; }
    (a) orange (b) black (c) white (d) purple
  7. 7.📱 min-width: 800px applies when the screen is ___. (a) 800px or wider (b) turned off (c) exactly 100px (d) 800px or narrower
  8. 8.🚀 Which file should this code go in: score = score + 1; (a) index.html (b) style.css (c) script.js
  9. 9.📱 Responsive design means a page ___. (a) never changes (b) fits every screen (c) has no pictures (d) is only for laptops
  10. 10.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
    <p>Hello, world!</p>
  11. 11.🔐 Is Blue@Tiger_74 a strong or a weak password? (a) weak (b) strong
  12. 12.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) type the password (b) share it with friends (c) click it twice (d) close it, tell an adult
  13. 13.🎯 What kind of selector is #main? (a) a class selector (b) an id selector (c) an element selector
  14. 14.True or false: <input type="radio"> picks a day. (a) True (b) False
  15. 15.True or false: HTML on its own cannot run a game loop. (a) False (b) True
  16. 16.Which of these is a weak password? (a) abcd1234 (b) Chai$Cup_19x (c) Rain#Drop_42! (d) Blue@Tiger_74
  17. 17.Which of these is true of a web browser? (a) opens web pages for us (b) saves our .html files (c) is where we type code (d) hosts websites online
  18. 18.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
  19. 19.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 310px;
      justify-content: flex-start;
    }
    Inside are 3 boxes, each 100px wide (no margins).
  20. 20.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) </head> (c) </html> (d) <!DOCTYPE html>
  21. 21.📊 How many cells does this table have in all?
    <table>
      <tr><td>Grapes</td><td>Orange</td><td>Jamun</td><td>Orange</td></tr>
      <tr><td>Banana</td><td>Guava</td><td>Banana</td><td>Mango</td></tr>
      <tr><td>Jamun</td><td>Mango</td><td>Mango</td><td>Mango</td></tr>
    </table>
  22. 22.📊 Which tag holds the whole table? (a) <tr> (b) <td> (c) <caption> (d) <table>
  23. 23.🖼️ Which attribute of <img> names the picture file? (a) height (b) width (c) alt (d) src
  24. 24.True or false: <input type="password"> picks a day. (a) True (b) False
  25. 25.⚡ Where does console.log() show its output? (a) in the console (b) in the address bar (c) on the printer (d) on the title bar
  26. 26.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) magenta (c) blue (d) red
  27. 27.True or false: JavaScript counts down a timer. (a) True (b) False
  28. 28.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Papaya</li>
    </ol>
    (a) bullets (b) numbers
  29. 29.📱 The screen is 375px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 6px;
      }
    }
    (a) Yes (b) No
  30. 30.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <p> (d) <pic>
  31. 31.🔍 Which is the odd one out? (a) puts a picture on a page (b) makes a link (c) makes headings and lists (d) lays out the page
  32. 32.🔁 How many times does this code print “Hi”?
    for (let i = 0; i < 4; i++) {
      console.log("Hi");
    }
  33. 33.True or false: <h1> has a closing tag. (a) False (b) True
  34. 34.True or false: <aside> holds a news story. (a) True (b) False
  35. 35.True or false: <caption> makes one table row. (a) False (b) True
  36. 36.🔗 Which words do you click on?
    <a href="about.html">Maths fun</a>
    (a) about.html (b) href (c) Maths fun (d) Art corner
  37. 37.🌗 Is white on black easy or hard to read? (a) easy to read (b) hard to read
  38. 38.🔗 Which words do you click on?
    <a href="news.html">Maths fun</a>
    (a) Art corner (b) href (c) Maths fun (d) news.html
  39. 39.📋 What number does the browser show next to “Litchi”?
    <ol start="7">
      <li>Banana</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Mango</li>
    </ol>
  40. 40.🔗 Where does this link open?
    <a href="art.html" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab

Answer key

  1. content
  2. { }
  3. 1
  4. All about me
  5. #00ff00
  6. purple
  7. 800px or wider
  8. script.js
  9. fits every screen
  10. 2
  11. strong
  12. close it, tell an adult
  13. an id selector
  14. False
  15. True
  16. abcd1234
  17. opens web pages for us
  18. red
  19. 10
  20. <!DOCTYPE html>
  21. 12
  22. <table>
  23. src
  24. False
  25. in the console
  26. blue
  27. True
  28. numbers
  29. Yes
  30. <img>
  31. lays out the page
  32. 4
  33. True
  34. False
  35. False
  36. Maths fun
  37. easy to read
  38. Maths fun
  39. 9
  40. in a new tab

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