← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 620 · 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 selector is the strongest? (a) a class selector (b) an element selector (c) an id selector
  2. 2.True or false: let score = 0; goes in script.js. (a) True (b) False
  3. 3.🧭 Is <section> semantic or not semantic? (a) not semantic (b) semantic
  4. 4.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Art Gallery (b) index.html (c) All about me (d) Here is my best one.
  5. 5.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) bright green (c) black (d) blue
  6. 6.🔢 To build and share your first web page, what comes right after “test in a browser”? (a) plan what to show (b) publish it online (c) write the HTML (d) add CSS styles
  7. 7.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  8. 8.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h5> (d) <h6>
  9. 9.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Mango</li>
    </ul>
    (a) numbers (b) bullets
  10. 10.What does text-align do? (a) picks the font style (b) centres a heading (c) sets the letter colour (d) makes the text bold
  11. 11.🚀 Which file should this code go in: <p>Hello!</p> (a) style.css (b) script.js (c) index.html
  12. 12.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  13. 13.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>My best friend</p>
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <h2>Our school trip</h2>
  14. 14.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="fruit"> Banana
      <input type="checkbox" name="fruit"> Guava
      <input type="checkbox" name="fruit"> Litchi
    </form>
  15. 15.Which of these is the border? (a) the gap round content (b) the text or picture (c) a solid or dotted edge (d) space outside the border
  16. 16.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine</p>
  17. 17.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 160px;
      padding: 20px;
      border: 2px solid black;
      margin: 10px;
    }
  18. 18.⚡ What does this code print? (Look at the quotes!)
    let x = "8";
    let y = 6;
    console.log(x + y);
    (a) Error (b) 14 (c) 86
  19. 19.🔢 On a typical page, from top to bottom, what comes right after “<nav>”? (a) <header> (b) <main> (c) <footer>
  20. 20.🛡️ Online: is it safe to check for https first? (a) not safe (b) safe
  21. 21.🧭 Which semantic tag holds the menu of links? (a) <main> (b) <header> (c) <nav> (d) <article>
  22. 22.🖼️ Which attribute of <img> describes the picture? (a) alt (b) width (c) height (d) src
  23. 23.🔍 Which line is missing its closing tag?
    line 1: <b>My best friend</b>
    line 2: <h2>Fun facts
    line 3: <i>Cricket is fun.</i>
    (a) line 1 (b) line 3 (c) line 2
  24. 24.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    (a) Our school trip (b) My best friend (c) Hello, world!
  25. 25.📝 What does a password box show instead of letters? (a) capital letters (b) emojis (c) dots (d) numbers
  26. 26.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Grapes</td><td>Guava</td><td>Orange</td></tr>
      <tr><td>Mango</td><td>Litchi</td><td>Papaya</td></tr>
      <tr><td>Banana</td><td>Banana</td><td>Papaya</td></tr>
    </table>
  27. 27.Which of these is not safe to do online? (a) check for https first (b) tell a trusted adult (c) use a nickname in games (d) meet an online stranger
  28. 28.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <!DOCTYPE html> (d) <html>
  29. 29.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  30. 30.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>Hello, world!</h2>
    <h2>Our school trip</h2>
    <h2>I love mangoes.</h2>
    <p>Good morning!</p>
    <p>Good morning!</p>
  31. 31.🔁 What does this code print?
    let score = 30;
    if (score < 31) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) You win (b) Play again
  32. 32.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Rain today</p>
    <p>I love mangoes.</p>
  33. 33.True or false: in <img>, src shows if the image fails. (a) True (b) False
  34. 34.🌍 What is the domain name in this URL?
    http://school.example.in/news/today.html
    (a) school.example.in (b) http (c) /news/today.html (d) www.example.net
  35. 35.🎯 What kind of selector is .menu? (a) a class selector (b) an id selector (c) an element selector
  36. 36.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 22px;
      }
    }
  37. 37.True or false: HTML makes headings and lists. (a) False (b) True
  38. 38.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 18px;
      }
    }
  39. 39.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) bright green (c) red (d) white
  40. 40.🔗 Which address opens when you click this link?
    <a href="https://example.com">Contact us</a>
    (a) art.html (b) https://example.com (c) maths.html (d) Contact us

Answer key

  1. an id selector
  2. True
  3. semantic
  4. Art Gallery
  5. cyan
  6. publish it online
  7. No
  8. <h1>
  9. bullets
  10. centres a heading
  11. index.html
  12. in the body
  13. 2
  14. 3
  15. a solid or dotted edge
  16. 2
  17. 224
  18. 86
  19. <main>
  20. safe
  21. <nav>
  22. alt
  23. line 2
  24. My best friend
  25. dots
  26. 3
  27. meet an online stranger
  28. <!DOCTYPE html>
  29. in a new tab
  30. 3
  31. You win
  32. 3
  33. False
  34. school.example.in
  35. a class selector
  36. 22
  37. True
  38. 16
  39. black
  40. https://example.com

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