← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 443 · 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 CSS selector matches this element?
    <li class="star" id="logo">Hello</li>
    (a) .menu (b) li (c) div (d) #star
  2. 2.True or false: a web server is where we type code. (a) False (b) True
  3. 3.True or false: <article> holds one blog post. (a) True (b) False
  4. 4.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <a> (d) <img>
  5. 5.🔢 To build and share your first web page, which comes first: “plan what to show” or “write the HTML”? (a) write the HTML (b) plan what to show
  6. 6.What does justify-content: space-between do? (a) equal gaps, none at ends (b) packs boxes at the start (c) packs boxes at the end (d) puts boxes in the middle
  7. 7.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) alt (c) src (d) height
  8. 8.⚡ What does this code print? (Look at the quotes!)
    let x = "6";
    let y = 8;
    console.log(x + y);
    (a) 68 (b) Error (c) 14
  9. 9.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
  10. 10.🧭 Is <article> semantic or not semantic? (a) semantic (b) not semantic
  11. 11.🔁 Which loop repeats code a set number of times? (a) if (b) let (c) for (d) else
  12. 12.Which of these is an empty tag? (a) <ul> (b) <li> (c) <title> (d) <meta>
  13. 13.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  14. 14.True or false: a web browser colours code to help us. (a) True (b) False
  15. 15.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  16. 16.🖌️ Which CSS property makes the text bold? (a) text-align (b) font-weight (c) background-color (d) font-size
  17. 17.🧭 Which semantic tag holds a news story? (a) <header> (b) <nav> (c) <aside> (d) <article>
  18. 18.🔗 Which words do you click on?
    <a href="contact.html">Maths fun</a>
    (a) Maths fun (b) href (c) contact.html (d) Art corner
  19. 19.✍️ Which property is set to 10px in this rule?
    h2 {
      margin: 10px;
      padding: 8px;
    }
    (a) margin (b) 10px (c) padding (d) font-weight
  20. 20.True or false: <ol> shows bullet points. (a) True (b) False
  21. 21.⚖️ Which selector is the weakest? (a) an id selector (b) a class selector (c) an element selector
  22. 22.🔗 Where does this link open?
    <a href="maths.html">Play games</a>
    (a) in a new tab (b) in the same tab
  23. 23.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
  24. 24.🔁 Which word runs code only when something is true? (a) for (b) let (c) log (d) if
  25. 25.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h4> or <h1>? (a) <h5> (b) <h4> (c) <h3> (d) <h1>
  26. 26.True or false: <h1> goes in the body. (a) False (b) True
  27. 27.🛡️ Should you share your password with your best friend? (a) Yes (b) No
  28. 28.🚀 Which file should this code go in: <h1>My Site</h1> (a) script.js (b) style.css (c) index.html
  29. 29.Which of these has a closing tag? (a) <input> (b) <hr> (c) <meta> (d) <p>
  30. 30.🔗 Where does this link open?
    <a href="https://example.com">School news</a>
    (a) in a new tab (b) in the same tab
  31. 31.♿ Does this help everyone, or make the page harder to use: tiny grey text? (a) makes it harder (b) helps everyone
  32. 32.True or false: <h1> goes in the head. (a) False (b) True
  33. 33.True or false: JavaScript sets colours and fonts. (a) True (b) False
  34. 34.🧭 Which semantic tag holds the main content? (a) <footer> (b) <main> (c) <aside> (d) <header>
  35. 35.⚖️ What colour is the text of this element?
    <h1 class="big" id="top">Hi</h1>
    CSS:
    #top { color: white; }
    h1 { color: purple; }
    (a) white (b) purple (c) black (d) yellow
  36. 36.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Banana</li>
    </ol>
  37. 37.True or false: <br> has a closing tag. (a) False (b) True
  38. 38.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 28px;
      }
    }
  39. 39.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <p> (d) <h6>
  40. 40.What does justify-content: center do? (a) equal gaps, none at ends (b) packs boxes at the start (c) packs boxes at the end (d) puts boxes in the middle

Answer key

  1. li
  2. False
  3. True
  4. <a>
  5. plan what to show
  6. equal gaps, none at ends
  7. alt
  8. 68
  9. 255
  10. semantic
  11. for
  12. <meta>
  13. Yes
  14. False
  15. in the body
  16. font-weight
  17. <article>
  18. Maths fun
  19. margin
  20. False
  21. an element selector
  22. in the same tab
  23. 2
  24. if
  25. <h1>
  26. True
  27. No
  28. index.html
  29. <p>
  30. in the same tab
  31. makes it harder
  32. False
  33. False
  34. <main>
  35. white
  36. 2
  37. False
  38. 24
  39. <h1>
  40. puts boxes in the middle

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