← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 286 · 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.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) at the bottom (d) on the browser tab
  2. 2.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 9; i++) {
      total = total + 9;
    }
    console.log(total);
  3. 3.🔗 Which words do you click on?
    <a href="maths.html">Visit the site</a>
    (a) Maths fun (b) maths.html (c) Visit the site (d) href
  4. 4.🖌️ Which CSS property picks the font style? (a) text-align (b) font-family (c) font-size (d) font-weight
  5. 5.🖌️ Which CSS property sets the letter colour? (a) background-color (b) text-align (c) font-family (d) color
  6. 6.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
  7. 7.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  8. 8.🧭 How many <main> parts should a page have? (a) none (b) ten (c) three (d) one
  9. 9.True or false: in <img>, src sets how tall it is. (a) False (b) True
  10. 10.🔗 Where does this link open?
    <a href="maths.html">School news</a>
    (a) in a new tab (b) in the same tab
  11. 11.Which of these is an opening tag? (a) </b> (b) </h1> (c) <b> (d) </p>
  12. 12.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Good morning!</p> -->
  13. 13.Which of these is safe to do online? (a) put secrets in comments (b) download from pop-ups (c) type a password on http (d) keep passwords secret
  14. 14.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  15. 15.Which of these has a closing tag? (a) <img> (b) <br> (c) <input> (d) <title>
  16. 16.🛡️ Is it safe to use the same password on every site? (a) Yes (b) No
  17. 17.True or false: in <img>, alt shows if the image fails. (a) True (b) False
  18. 18.What does font-family do? (a) centres a heading (b) picks the font style (c) colours behind the text (d) makes the text bold
  19. 19.Which of these is an opening tag? (a) </li> (b) </title> (c) <body> (d) </b>
  20. 20.📱 min-width: 800px applies when the screen is ___. (a) 800px or narrower (b) exactly 100px (c) 800px or wider (d) turned off
  21. 21.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h6> or <h5>? (a) <h4> (b) <h5> (c) <h1> (d) <h6>
  22. 22.🌍 What is the path in this URL?
    https://kids.example.org/news/today.html
    (a) /news/today.html (b) https (c) /games/chess.html (d) kids.example.org
  23. 23.✍️ What value is given to padding in this rule?
    #top {
      border: 2px solid;
      padding: 8px;
      color: red;
      text-align: center;
    }
    (a) 8px (b) padding (c) bold (d) 2px solid
  24. 24.True or false: <li> lists steps in order. (a) True (b) False
  25. 25.📱 The screen is 1366px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 16px;
      }
    }
    (a) Yes (b) No
  26. 26.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<body>”? (a) <body> (b) <!DOCTYPE html>
  27. 27.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
    (a) My best friend (b) Hello, world! (c) Cricket is fun. (d) The red kite
  28. 28.📊 Which tag makes a heading cell? (a) <th> (b) <caption> (c) <tr> (d) <td>
  29. 29.✍️ What is the selector in this CSS rule?
    .box {
      width: 300px;
      border: 2px solid;
    }
    (a) 2px solid (b) .box (c) h2 (d) width
  30. 30.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 360px;
      justify-content: space-between;
    }
    Inside are 3 boxes, each 80px wide (no margins).
  31. 31.True or false: a web browser shows line numbers. (a) True (b) False
  32. 32.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  33. 33.🏷️ Which is the closing tag for <p>? (a) <\p> (b) </p> (c) <p> (d) <p/>
  34. 34.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is a game (b) the data is scrambled (c) the site is free (d) the site is fast
  35. 35.📊 Which tag gives the table a title? (a) <tr> (b) <th> (c) <td> (d) <caption>
  36. 36.True or false: to ask before downloading is not safe. (a) False (b) True
  37. 37.⚡ A JavaScript file usually ends with which extension? (a) .js (b) .html (c) .css (d) .jpg
  38. 38.⚡ Which word makes a new variable? (a) put (b) give (c) let (d) make
  39. 39.What does font-size do? (a) sets the letter colour (b) picks the font style (c) makes the text bold (d) makes letters bigger
  40. 40.🚀 Which file should this code go in: <img src="cat.png"> (a) index.html (b) script.js (c) style.css

Answer key

  1. on the browser tab
  2. 81
  3. Visit the site
  4. font-family
  5. color
  6. False
  7. in the head
  8. one
  9. False
  10. in the same tab
  11. <b>
  12. 1
  13. keep passwords secret
  14. an opening tag
  15. <title>
  16. No
  17. True
  18. picks the font style
  19. <body>
  20. 800px or wider
  21. <h1>
  22. /news/today.html
  23. 8px
  24. False
  25. Yes
  26. <!DOCTYPE html>
  27. The red kite
  28. <th>
  29. .box
  30. 60
  31. False
  32. a closing tag
  33. </p>
  34. the data is scrambled
  35. <caption>
  36. False
  37. .js
  38. let
  39. makes letters bigger
  40. index.html

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