← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 841 · 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.🔐 Is abcd1234 a strong or a weak password? (a) strong (b) weak
  2. 2.🌈 Which colour of light is strongest in rgb(36, 232, 136)? (a) green (b) red (c) blue
  3. 3.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) opens it in a new tab (d) makes it bold
  4. 4.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  5. 5.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  6. 6.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) click it twice (b) share it with friends (c) type the password (d) close it, tell an adult
  7. 7.💬 Does the browser show comments on the page? (a) Yes (b) No
  8. 8.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
  9. 9.📝 Which input type takes only numbers? (a) radio (b) password (c) text (d) number
  10. 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 4 (d) 6
  11. 11.🔁 Which loop repeats code a set number of times? (a) if (b) let (c) else (d) for
  12. 12.⚖️ What colour is the text of this element?
    <h2 class="star" id="logo">Hi</h2>
    CSS:
    #logo { color: yellow; }
    .star { color: black; }
    h2 { color: red; }
    (a) yellow (b) orange (c) black (d) red
  13. 13.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) attribute (c) editor (d) element
  14. 14.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) height (d) alt
  15. 15.Which of these is a strong password? (a) 123456 (b) Blue@Tiger_74 (c) password (d) abcd1234
  16. 16.✍️ What is the selector in this CSS rule?
    body {
      width: 300px;
      padding: 8px;
      text-align: center;
      color: red;
    }
    (a) 8px (b) body (c) width (d) .box
  17. 17.⚡ What does this code print? (Look at the quotes!)
    let x = "8";
    let y = 3;
    console.log(x + y);
    (a) Error (b) 83 (c) 11
  18. 18.True or false: <ul> is an ordered list. (a) True (b) False
  19. 19.🔍 Which is the odd one out? (a) gives the page structure (b) counts down a timer (c) checks a quiz answer (d) shows a pop-up message
  20. 20.True or false: to share your OTP is safe. (a) False (b) True
  21. 21.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Machine (d) Markup
  22. 22.📊 How many cells does this table have in all?
    <table>
      <tr><td>Orange</td><td>Grapes</td><td>Papaya</td><td>Banana</td></tr>
      <tr><td>Litchi</td><td>Guava</td><td>Guava</td><td>Banana</td></tr>
      <tr><td>Grapes</td><td>Papaya</td><td>Papaya</td><td>Guava</td></tr>
      <tr><td>Jamun</td><td>Guava</td><td>Banana</td><td>Grapes</td></tr>
    </table>
  23. 23.🚀 What is the home page file of a website usually called? (a) start.js (b) home.css (c) main.png (d) index.html
  24. 24.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  25. 25.✍️ How many declarations (property: value pairs) are in this rule?
    h1 {
      text-align: center;
      padding: 8px;
      font-size: 20px;
    }
  26. 26.🔍 One closing tag is missing. Which one?
    <b>Fun facts
    <u>Rain today</u>
    <h1>My best friend</h1>
    (a) </i> (b) </u> (c) </h1> (d) </b>
  27. 27.True or false: h1 { font-size: 32px; } goes in index.html. (a) False (b) True
  28. 28.⚖️ What colour is the text of this element?
    <h2 class="box" id="hero">Hi</h2>
    CSS:
    .box { color: black; }
    .box { color: purple; }
    (a) purple (b) black (c) yellow (d) green
  29. 29.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <pic> (d) <a>
  30. 30.🎯 Which CSS selector matches this element?
    <h2 class="box" id="top">Hello</h2>
    (a) .top (b) #box (c) h2 (d) li
  31. 31.🔗 Which words do you click on?
    <a href="maths.html">Contact us</a>
    (a) Contact us (b) maths.html (c) href (d) Visit the site
  32. 32.🔁 What does i++ do? (a) doubles i (b) prints i (c) takes 1 from i (d) adds 1 to i
  33. 33.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
  34. 34.Which of these is true of <main>? (a) holds copyright notes (b) holds the menu of links (c) holds the main content (d) holds the logo and title
  35. 35.✍️ What is the selector in this CSS rule?
    h2 {
      text-align: center;
      color: red;
      background-color: yellow;
    }
    (a) text-align (b) h1 (c) h2 (d) red
  36. 36.🔁 How many times does this code print “Hello”?
    for (let i = 2; i < 11; i++) {
      console.log("Hello");
    }
  37. 37.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
  38. 38.📊 How many cells does this table have in all?
    <table>
      <tr><td>Guava</td><td>Mango</td><td>Jamun</td><td>Guava</td></tr>
      <tr><td>Orange</td><td>Jamun</td><td>Guava</td><td>Jamun</td></tr>
    </table>
  39. 39.True or false: <h1>My Site</h1> goes in index.html. (a) True (b) False
  40. 40.🧩 Which language gives the page structure? (a) CSS (b) JavaScript (c) HTML

Answer key

  1. weak
  2. green
  3. opens it in a new tab
  4. in the head
  5. No
  6. close it, tell an adult
  7. No
  8. 100
  9. number
  10. 3
  11. for
  12. yellow
  13. element
  14. src
  15. Blue@Tiger_74
  16. body
  17. 83
  18. False
  19. gives the page structure
  20. False
  21. Markup
  22. 16
  23. index.html
  24. has a closing tag
  25. 3
  26. </b>
  27. False
  28. purple
  29. <img>
  30. h2
  31. Contact us
  32. adds 1 to i
  33. to leave notes
  34. holds the main content
  35. h2
  36. 9
  37. <ol>
  38. 8
  39. True
  40. HTML

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