← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 714 · 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 <= 3; i++) {
      total = total + 3;
    }
    console.log(total);
  2. 2.🚀 Which file is best for code that reacts to clicks? (a) style.css (b) index.html (c) script.js (d) notes.txt
  3. 3.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
  4. 4.🖌️ What colour are the letters?
    li {
      background-color: red;
      font-size: 28px;
      text-align: right;
      color: white;
    }
    (a) red (b) yellow (c) white
  5. 5.🎯 What kind of selector is .menu? (a) an id selector (b) a class selector (c) an element selector
  6. 6.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
  7. 7.✍️ Which sign goes between a property and its value? (a) ; (b) = (c) - (d) :
  8. 8.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Welcome! (b) Thanks for visiting. (c) My Hobbies (d) index.html
  9. 9.Which of these is true of a web browser? (a) is where we type code (b) saves our .html files (c) shows pages from the web (d) colours code to help us
  10. 10.🎯 What kind of selector is .card? (a) a class selector (b) an element selector (c) an id selector
  11. 11.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 230px;
      justify-content: flex-end;
    }
    Inside are 3 boxes, each 60px wide (no margins).
  12. 12.🖌️ What colour are the letters?
    p {
      color: purple;
      background-color: black;
      text-align: center;
      font-size: 16px;
    }
    (a) purple (b) green (c) black
  13. 13.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Fun facts</p>
    <!-- <p>Rain today</p> -->
    <p>The red kite</p>
    (a) Our school trip (b) Fun facts (c) Rain today (d) The red kite
  14. 14.What does font-size do? (a) colours behind the text (b) sets the letter colour (c) picks the font style (d) makes letters bigger
  15. 15.What does justify-content: center do? (a) puts boxes in the middle (b) packs boxes at the start (c) packs boxes at the end (d) equal gaps, none at ends
  16. 16.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
  17. 17.🔁 When does the else part run? (a) never (b) when if is true (c) when if is false (d) always
  18. 18.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  19. 19.🔒 Is the connection to this address scrambled (encrypted)?
    http://school.example.in/games/chess.html
    (a) Yes (b) No
  20. 20.🏷️ Which is the closing tag for <em>? (a) <em/> (b) <\em> (c) <em> (d) </em>
  21. 21.⚖️ Which selector is the weakest? (a) an id selector (b) an element selector (c) a class selector
  22. 22.🚀 Which file should this code go in: <p>Hello!</p> (a) index.html (b) script.js (c) style.css
  23. 23.Which of these does HTML do? (a) checks a quiz answer (b) makes a link (c) reacts to a button click (d) counts down a timer
  24. 24.📝 Which tag gives a form box a name you can click? (a) <h1> (b) <hr> (c) <label> (d) <title>
  25. 25.True or false: in <img>, height names the picture file. (a) False (b) True
  26. 26.Which of these is an empty tag? (a) <li> (b) <title> (c) <h1> (d) <br>
  27. 27.⚖️ Which selector is the strongest? (a) an element selector (b) a class selector (c) an id selector
  28. 28.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ol>
    (a) bullets (b) numbers
  29. 29.🔢 On a typical page, from top to bottom, which comes LAST? (a) <nav> (b) <footer> (c) <main> (d) <header>
  30. 30.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) a comment (d) an attribute
  31. 31.🎯 Which sign starts a class selector? (a) @ (b) . (c) & (d) #
  32. 32.True or false: JavaScript changes the text size. (a) True (b) False
  33. 33.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h4>? (a) <h5> (b) <h4> (c) <h3> (d) <h1>
  34. 34.🔗 Which words do you click on?
    <a href="maths.html">Art corner</a>
    (a) href (b) Art corner (c) maths.html (d) School news
  35. 35.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Banana</td><td>Papaya</td></tr>
      <tr><td>Papaya</td><td>Grapes</td></tr>
    </table>
  36. 36.🌐 Which one turns HTML into a page? (a) a code editor (b) a web server (c) a web browser
  37. 37.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  38. 38.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h6>? (a) <h6> (b) <h3> (c) <h1> (d) <h4>
  39. 39.🖌️ Which CSS property sets the letter colour? (a) font-weight (b) font-size (c) text-align (d) color
  40. 40.📋 What number does the browser show next to “Grapes”?
    <ol start="2">
      <li>Banana</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Mango</li>
    </ol>

Answer key

  1. 9
  2. script.js
  3. blue
  4. white
  5. a class selector
  6. Yes
  7. :
  8. My Hobbies
  9. shows pages from the web
  10. a class selector
  11. 50
  12. purple
  13. Rain today
  14. makes letters bigger
  15. puts boxes in the middle
  16. 255
  17. when if is false
  18. Yes
  19. No
  20. </em>
  21. an element selector
  22. index.html
  23. makes a link
  24. <label>
  25. False
  26. <br>
  27. an id selector
  28. numbers
  29. <footer>
  30. an attribute
  31. .
  32. False
  33. <h1>
  34. Art corner
  35. 6
  36. a web browser
  37. has a closing tag
  38. <h6>
  39. color
  40. 3

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