← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 705 · 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 heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h5>? (a) <h5> (b) <h3> (c) <h2> (d) <h1>
  2. 2.True or false: img is an element selector. (a) False (b) True
  3. 3.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) height (d) alt
  4. 4.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 10 (d) 4
  5. 5.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  6. 6.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) index.html (c) Planets (d) We won by 5 runs.
  7. 7.🌍 Which one scrambles data on its way? (a) the browser (b) HTTPS (c) the server (d) the URL
  8. 8.Which of these is true of <main>? (a) sits at the very top (b) holds the logo and title (c) is the page’s key part (d) holds one blog post
  9. 9.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Rain today</p>
    <p>Rain today</p>
    <p>Our school trip</p>
    <h2>I love mangoes.</h2>
    <p>The red kite</p>
  10. 10.🧭 Which semantic tag sits at the bottom? (a) <aside> (b) <nav> (c) <main> (d) <footer>
  11. 11.✍️ What is the selector in this CSS rule?
    h1 {
      background-color: yellow;
      padding: 8px;
    }
    (a) p (b) 8px (c) h1 (d) background-color
  12. 12.True or false: <ul> is an ordered list. (a) False (b) True
  13. 13.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
  14. 14.🔍 One closing tag is missing. Which one?
    <h2>Cricket is fun.</h2>
    <b>I love mangoes.</b>
    <small>Fun facts
    (a) </b> (b) </h3> (c) </h2> (d) </small>
  15. 15.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 10px;
      }
    }
  16. 16.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) magenta (c) blue (d) white
  17. 17.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
    (a) Fun facts (b) The red kite (c) Cricket is fun.
  18. 18.Which of these is true of <nav>? (a) holds a side box of tips (b) sits at the bottom (c) holds extra side notes (d) holds the menu of links
  19. 19.💬 How does an HTML comment start? (a) // (b) /* (c) <!-- (d) #
  20. 20.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to load it faster (d) to describe the image
  21. 21.🌈 Which colour is #0000ff? (a) black (b) blue (c) white (d) cyan
  22. 22.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  23. 23.🔍 Which is the odd one out? (a) is where we type code (b) sends pages over the net (c) colours code to help us (d) shows line numbers
  24. 24.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <!-- <p>Rain today</p> -->
    (a) I love mangoes. (b) My best friend (c) Rain today
  25. 25.🔁 When does the else part run? (a) when if is false (b) never (c) when if is true (d) always
  26. 26.🔠 Which tag is the least important heading? (a) <h3> (b) <h1> (c) <p> (d) <h6>
  27. 27.⚡ Which JavaScript word makes a new variable? (a) for (b) if (c) console.log() (d) let
  28. 28.🧭 Is <article> semantic or not semantic? (a) semantic (b) not semantic
  29. 29.Which of these is an opening tag? (a) </body> (b) </b> (c) </p> (d) <b>
  30. 30.True or false: a web browser sends pages over the net. (a) True (b) False
  31. 31.🌈 Which colour is #00ffff? (a) cyan (b) blue (c) bright green (d) white
  32. 32.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h3>Cricket is fun.</h3>
    <p>I love mangoes.</p>
    <p>I love mangoes.</p>
  33. 33.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Banana</td><td>Jamun</td><td>Litchi</td><td>Orange</td></tr>
      <tr><td>Orange</td><td>Guava</td><td>Banana</td><td>Mango</td></tr>
      <tr><td>Banana</td><td>Guava</td><td>Papaya</td><td>Banana</td></tr>
    </table>
  34. 34.📝 How many <input> tags are in this form?
    <form>
      <input type="text">
      <input type="date">
      <input type="number">
      <input type="password">
      <input type="email">
      <input type="submit" value="Send">
    </form>
  35. 35.🔁 How many numbers does this code print?
    for (let i = 0; i < 17; i = i + 4) {
      console.log(i);
    }
  36. 36.🎯 Which CSS selector matches this element?
    <li class="big" id="hero">Hello</li>
    (a) div (b) li (c) #top (d) .hero
  37. 37.📱 The screen is 1100px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 20px;
      }
    }
    (a) No (b) Yes
  38. 38.⚖️ What colour is the text of this element?
    <p class="note" id="intro">Hi</p>
    CSS:
    #intro { color: blue; }
    #intro { color: green; }
    (a) blue (b) green (c) purple (d) white
  39. 39.Which of these does HTML do? (a) changes the text size (b) reacts to a button click (c) changes the page live (d) makes a link
  40. 40.♿ A part of the page is under a <h2> heading. Which tag should its sub-heading use? (a) <h4> (b) <h5> (c) <h1> (d) <h3>

Answer key

  1. <h1>
  2. True
  3. src
  4. 6
  5. False
  6. Riya’s Recipes
  7. HTTPS
  8. is the page’s key part
  9. 5
  10. <footer>
  11. h1
  12. False
  13. <ol>
  14. </small>
  15. 10
  16. white
  17. Cricket is fun.
  18. holds the menu of links
  19. <!--
  20. to describe the image
  21. blue
  22. in a new tab
  23. sends pages over the net
  24. Rain today
  25. when if is false
  26. <h6>
  27. let
  28. semantic
  29. <b>
  30. False
  31. cyan
  32. 2
  33. 4
  34. 6
  35. 5
  36. li
  37. No
  38. green
  39. makes a link
  40. <h3>

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