← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 426 · 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 is the path in this URL?
    http://learn.example.com/games/chess.html
    (a) /about.html (b) /games/chess.html (c) http (d) learn.example.com
  2. 2.🔍 Which is the odd one out? (a) adds space around boxes (b) puts a picture on a page (c) makes headings and lists (d) makes a link
  3. 3.🔍 Which is the odd one out? (a) counts down a timer (b) gives the page structure (c) puts a picture on a page (d) makes a form box
  4. 4.🚀 Which file should this code go in: score = score + 1; (a) script.js (b) index.html (c) style.css
  5. 5.✍️ What is the selector in this CSS rule?
    li {
      padding: 8px;
      background-color: yellow;
    }
    (a) body (b) yellow (c) padding (d) li
  6. 6.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Mango</li>
      <li>Guava</li>
    </ul>
    (a) numbers (b) bullets
  7. 7.🌐 Which one answers page requests? (a) a web browser (b) a code editor (c) a web server
  8. 8.Which of these is a closing tag? (a) <p> (b) <li> (c) <title> (d) </b>
  9. 9.🚀 Which file should this code go in: alert("Hi"); (a) style.css (b) index.html (c) script.js
  10. 10.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 8; i++) {
      total = total + 7;
    }
    console.log(total);
  11. 11.🔁 What does this code print?
    let age = 23;
    if (age >= 15) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  12. 12.Which of these is an opening tag? (a) </title> (b) </li> (c) <body> (d) </h1>
  13. 13.📱 max-width: 600px applies when the screen is ___. (a) exactly 1000px (b) 600px or narrower (c) 600px or wider (d) turned off
  14. 14.💪 Which flexbox property spaces boxes along a row? (a) justify-content (b) flex-direction (c) display: flex (d) align-items
  15. 15.Which of these is true of a web browser? (a) answers page requests (b) shows line numbers (c) opens web pages for us (d) saves our .html files
  16. 16.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <link about.html>
  17. 17.⚡ What number does this code print?
    let score = 5;
    score = score + 17;
    score = score - 15;
    console.log(score);
  18. 18.Which of these is not safe to do online? (a) tell a trusted adult (b) ask before downloading (c) type a password on http (d) use a strong password
  19. 19.📄 Can HTML on its own make a form? (a) No (b) Yes
  20. 20.🌈 Which hex code is red? (a) #ffff00 (b) #ff0000 (c) #000000 (d) #ff00ff
  21. 21.What does justify-content: flex-start do? (a) packs boxes at the end (b) puts boxes in the middle (c) packs boxes at the start (d) equal gaps, none at ends
  22. 22.Which of these is padding? (a) space outside the border (b) a solid or dotted edge (c) the text or picture (d) the gap round content
  23. 23.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
  24. 24.🔍 One closing tag is missing. Which one?
    <h3>Fun facts</h3>
    <small>Rain today
    <u>I love mangoes.</u>
    (a) </h3> (b) </i> (c) </u> (d) </small>
  25. 25.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 360px;
      justify-content: center;
    }
    Inside are 3 boxes, each 80px wide (no margins).
  26. 26.🖌️ How big is the text, in px?
    li {
      color: orange;
      text-align: right;
      font-size: 28px;
      background-color: white;
    }
  27. 27.True or false: HTML on its own cannot pick a random number. (a) True (b) False
  28. 28.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  29. 29.♿ A part of the page is under a <h2> heading. Which tag should its sub-heading use? (a) <h6> (b) <h2> (c) <h3> (d) <h4>
  30. 30.📋 Does this list show bullets or numbers?
    <ol>
      <li>Litchi</li>
      <li>Banana</li>
    </ol>
    (a) bullets (b) numbers
  31. 31.✍️ Which sign ends each CSS declaration? (a) : (b) , (c) ; (d) .
  32. 32.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 90px;
      padding: 20px;
      border: 1px solid black;
      margin: 5px;
    }
  33. 33.🌍 What is the domain name in this URL?
    https://school.example.in/index.html
    (a) www.example.net (b) https (c) /index.html (d) school.example.in
  34. 34.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 280px;
      justify-content: center;
    }
    Inside are 2 boxes, each 60px wide (no margins).
  35. 35.What does background-color do? (a) colours behind the text (b) centres a heading (c) picks the font style (d) makes the text bold
  36. 36.Which of these is safe to do online? (a) meet an online stranger (b) put secrets in comments (c) click prize links (d) use a strong password
  37. 37.🔐 Is password a strong or a weak password? (a) strong (b) weak
  38. 38.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="50">
    (a) cake.jpg (b) dog.jpg (c) map.png (d) Map of India
  39. 39.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>Rain today</h2>
    <h2>Rain today</h2>
  40. 40.🖌️ How big is the text, in px?
    p {
      text-align: center;
      font-size: 28px;
      background-color: black;
      color: orange;
    }

Answer key

  1. /games/chess.html
  2. adds space around boxes
  3. counts down a timer
  4. script.js
  5. li
  6. bullets
  7. a web server
  8. </b>
  9. script.js
  10. 56
  11. teen
  12. <body>
  13. 600px or narrower
  14. justify-content
  15. opens web pages for us
  16. <a href="about.html">
  17. 7
  18. type a password on http
  19. Yes
  20. #ff0000
  21. packs boxes at the start
  22. the gap round content
  23. red
  24. </small>
  25. 60
  26. 28
  27. True
  28. a closing tag
  29. <h3>
  30. numbers
  31. ;
  32. 142
  33. school.example.in
  34. 80
  35. colours behind the text
  36. use a strong password
  37. weak
  38. map.png
  39. 3
  40. 28

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