← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 601 · 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.📱 What does a media query check? (a) the time of day (b) the battery level (c) the screen width (d) the page title
  2. 2.⚡ Which JavaScript word shows a pop-up box? (a) for (b) let (c) alert() (d) console.log()
  3. 3.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red<br>Stars shine<br>Kites fly high<br>Birds sing</p>
  4. 4.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
  5. 5.Which of these is an opening tag? (a) </h1> (b) </body> (c) <body> (d) </p>
  6. 6.True or false: <table> holds the whole table. (a) True (b) False
  7. 7.💪 Which justify-content value equal gaps, none at ends? (a) flex-end (b) flex-start (c) center (d) space-between
  8. 8.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to colour it (d) to describe the image
  9. 9.✍️ What is the selector in this CSS rule?
    #top {
      color: red;
      padding: 8px;
      font-style: italic;
      background-color: yellow;
    }
    (a) color (b) 8px (c) #top (d) li
  10. 10.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <a> (d) <link>
  11. 11.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Papaya</td><td>Orange</td><td>Banana</td></tr>
      <tr><td>Litchi</td><td>Grapes</td><td>Papaya</td></tr>
    </table>
  12. 12.🧭 How many <main> parts should a page have? (a) three (b) ten (c) one (d) none
  13. 13.🎯 Which CSS selector matches this element?
    <h1 class="big" id="intro">Hello</h1>
    (a) h1 (b) .intro (c) #big (d) h2
  14. 14.🌈 In #000025 the blue part is the hex number 25. What is it as a normal number?
  15. 15.⚡ Which JavaScript word runs code when true? (a) console.log() (b) let (c) for (d) if
  16. 16.✍️ How does a CSS comment start? (a) // (b) <!-- (c) # (d) /*
  17. 17.🧱 HTML gives a web page its ___. (a) speed (b) sound (c) colours (d) structure
  18. 18.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
    <!-- <p>The red kite</p> -->
  19. 19.Which of these does HTML do? (a) checks a quiz answer (b) makes a link (c) adds space around boxes (d) changes the page live
  20. 20.⚡ Which tag holds JavaScript in a page? (a) <style> (b) <js> (c) <script> (d) <code>
  21. 21.⚡ What number does this code print?
    let a = 2;
    let b = 2;
    console.log(a * b);
  22. 22.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 240px;
      justify-content: center;
    }
    Inside are 3 boxes, each 60px wide (no margins).
  23. 23.⚡ What does this code print? (Look at the quotes!)
    let x = "5";
    let y = 1;
    console.log(x + y);
    (a) 6 (b) 51 (c) Error
  24. 24.💪 Which flexbox property turns on flexbox? (a) align-items (b) display: flex (c) gap (d) flex-direction
  25. 25.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    (a) Fun facts (b) I love mangoes. (c) Good morning! (d) Cricket is fun.
  26. 26.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <li> (d) <ul>
  27. 27.🧭 Why use <nav> instead of <div> for a menu? (a) it tells its meaning (b) it adds pictures (c) it loads faster (d) it makes text red
  28. 28.⚡ What number does this code print?
    let a = 8;
    let b = 2;
    console.log(a * b);
  29. 29.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 1 (d) 10
  30. 30.What is <input type="radio"> for? (a) is for one line of words (b) lets you pick only one (c) is for an email address (d) picks a day
  31. 31.Which of these is not safe to do online? (a) share your OTP (b) keep passwords secret (c) ask before downloading (d) log out on shared PCs
  32. 32.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Sky is blue<br>Roses are red<br>Kites fly high<br>Rivers flow</p>
  33. 33.🌗 Is light grey on white easy or hard to read? (a) hard to read (b) easy to read
  34. 34.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Mango</li>
      <li>Litchi</li>
    </ul>
  35. 35.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 440px;
      justify-content: flex-start;
    }
    Inside are 4 boxes, each 100px wide (no margins).
  36. 36.📝 What does <hr> draw? (a) a link (b) a picture (c) a line across the page (d) a table
  37. 37.⚡ What does this code show?
    let name = "Meera";
    console.log("Well done, " + name + "!");
    (a) name (b) Well done, name! (c) Well done, Meera! (d) Meera
  38. 38.🎯 Which CSS selector matches this element?
    <p class="note" id="intro">Hello</p>
    (a) p (b) .intro (c) .big (d) #main
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>My best friend</p> -->
    <p>Good morning!</p>
    <p>Hello, world!</p>
  40. 40.🔗 Where does this link open?
    <a href="contact.html">Contact us</a>
    (a) in the same tab (b) in a new tab

Answer key

  1. the screen width
  2. alert()
  3. 5
  4. <ul>
  5. <body>
  6. True
  7. space-between
  8. to describe the image
  9. #top
  10. <a>
  11. 3
  12. one
  13. h1
  14. 37
  15. if
  16. /*
  17. structure
  18. 3
  19. makes a link
  20. <script>
  21. 4
  22. 30
  23. 51
  24. display: flex
  25. Fun facts
  26. <li>
  27. it tells its meaning
  28. 16
  29. 1
  30. lets you pick only one
  31. share your OTP
  32. 5
  33. hard to read
  34. 6
  35. 40
  36. a line across the page
  37. Well done, Meera!
  38. p
  39. 2
  40. in the same tab

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