← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 842 · 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.⚡ Which tag holds JavaScript in a page? (a) <script> (b) <style> (c) <code> (d) <js>
  2. 2.🔁 What does this code print?
    let age = 7;
    if (age < 37) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) child (b) teen
  3. 3.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) bright green (c) magenta (d) black
  4. 4.📦 In the box model, which part is the text or picture? (a) content (b) padding (c) margin (d) border
  5. 5.🔍 One closing tag is missing. Which one?
    <u>I love mangoes.</u>
    <i>Good morning!</i>
    <b>Our school trip
    (a) </em> (b) </i> (c) </u> (d) </b>
  6. 6.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
  7. 7.True or false: <b> is an empty tag. (a) True (b) False
  8. 8.🌍 What does a web address (URL) tell the browser? (a) the page colour (b) how old you are (c) where the page is (d) your password
  9. 9.Which of these is true of a code editor? (a) opens web pages for us (b) sends pages over the net (c) has an address bar (d) shows line numbers
  10. 10.🌍 What is the path in this URL?
    http://www.example.com/maths/tables.html
    (a) http (b) /index.html (c) www.example.com (d) /maths/tables.html
  11. 11.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  12. 12.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
  13. 13.🌈 In #0000b8 the blue part is the hex number b8. What is it as a normal number?
  14. 14.True or false: <footer> sits at the bottom. (a) False (b) True
  15. 15.📱 The screen is 820px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 18px;
      }
    }
    (a) No (b) Yes
  16. 16.True or false: “images with no alt” helps everyone use the page. (a) False (b) True
  17. 17.🌐 Which one colours code to help us? (a) a web server (b) a code editor (c) a web browser
  18. 18.🎨 Which tag holds CSS inside the head? (a) <script> (b) <css> (c) <body> (d) <style>
  19. 19.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
  20. 20.Which colour pair is hard to read? (a) yellow on black (b) dark grey on white (c) black on white (d) pink on red
  21. 21.🛡️ Should you share your password with your best friend? (a) No (b) Yes
  22. 22.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 170px;
      justify-content: flex-start;
    }
    Inside are 3 boxes, each 50px wide (no margins).
  23. 23.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 200px;
      justify-content: center;
    }
    Inside are 2 boxes, each 60px wide (no margins).
  24. 24.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 6 (d) 3
  25. 25.🔗 Where does this link open?
    <a href="about.html">About us</a>
    (a) in the same tab (b) in a new tab
  26. 26.True or false: padding is space inside the border. (a) False (b) True
  27. 27.🔁 Which word runs code only when something is true? (a) for (b) let (c) log (d) if
  28. 28.🔁 What does this code print?
    let score = 28;
    if (score > 24) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) Play again (b) You win
  29. 29.🌍 What is the domain name in this URL?
    http://www.example.com/games/chess.html
    (a) kids.example.org (b) www.example.com (c) http (d) /games/chess.html
  30. 30.⚖️ What colour is the text of this element?
    <p class="red" id="logo">Hi</p>
    CSS:
    .red { color: orange; }
    #logo { color: green; }
    (a) orange (b) purple (c) yellow (d) green
  31. 31.🖌️ What colour are the letters?
    h1 {
      color: blue;
      background-color: red;
      text-align: right;
      font-size: 20px;
    }
    (a) red (b) blue (c) yellow
  32. 32.🔍 One closing tag is missing. Which one?
    <b>Good morning!</b>
    <p>Fun facts
    <u>I love mangoes.</u>
    (a) </u> (b) </h1> (c) </b> (d) </p>
  33. 33.✍️ Which sign goes between a property and its value? (a) ; (b) : (c) = (d) -
  34. 34.True or false: <main> holds copyright notes. (a) True (b) False
  35. 35.True or false: “colour as the only clue” makes the page harder to use. (a) False (b) True
  36. 36.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Markup (d) Machine
  37. 37.What does justify-content: space-between do? (a) puts boxes in the middle (b) packs boxes at the start (c) equal gaps, none at ends (d) packs boxes at the end
  38. 38.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a slash / (d) a dot .
  39. 39.🎯 Which element does the selector li style? (a) <p id="end"> (b) <div> (c) <li class="note"> (d) <span class="note">
  40. 40.Which of these is not safe to do online? (a) tell a trusted adult (b) think before you post (c) ask before downloading (d) share your password

Answer key

  1. <script>
  2. teen
  3. black
  4. content
  5. </b>
  6. href
  7. False
  8. where the page is
  9. shows line numbers
  10. /maths/tables.html
  11. True
  12. <img>
  13. 184
  14. True
  15. Yes
  16. False
  17. a code editor
  18. <style>
  19. <a href="about.html">
  20. pink on red
  21. No
  22. 20
  23. 40
  24. 6
  25. in the same tab
  26. True
  27. if
  28. You win
  29. www.example.com
  30. green
  31. blue
  32. </p>
  33. :
  34. False
  35. True
  36. Markup
  37. equal gaps, none at ends
  38. a slash /
  39. <li class="note">
  40. share your password

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