← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 114 · 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.True or false: in <img>, width sets how tall it is. (a) True (b) False
  2. 2.🔢 On a typical page, from top to bottom, what comes right after “<nav>”? (a) <main> (b) <header> (c) <footer>
  3. 3.🔍 Which is the odd one out? (a) puts a picture on a page (b) makes headings and lists (c) reacts to a button click (d) makes a form box
  4. 4.🛡️ Before typing a password on a site, check the address starts with ___. (a) http (b) www (c) ftp (d) https
  5. 5.🔁 How many times does this code print “Hello”?
    for (let i = 2; i < 6; i++) {
      console.log("Hello");
    }
  6. 6.🔍 Which line is missing its closing tag?
    line 1: <small>My pets</small>
    line 2: <em>Cricket is fun.</em>
    line 3: <strong>Rain today
    (a) line 1 (b) line 3 (c) line 2
  7. 7.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 170px;
      justify-content: space-between;
    }
    Inside are 2 boxes, each 60px wide (no margins).
  8. 8.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) </h1> (d) <h1/>
  9. 9.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
    (a) Our school trip (b) My best friend (c) The red kite
  10. 10.📱 What does a media query check? (a) the time of day (b) the battery level (c) the page title (d) the screen width
  11. 11.🔁 What does this code print?
    let temp = 17;
    if (temp > 29) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Hot (b) Cool
  12. 12.True or false: <input type="email"> hides what you type. (a) True (b) False
  13. 13.⚖️ Which selector is the strongest? (a) a class selector (b) an element selector (c) an id selector
  14. 14.⚡ A JavaScript file usually ends with which extension? (a) .js (b) .html (c) .jpg (d) .css
  15. 15.📊 How many cells are in each row?
    <table>
      <tr><td>Papaya</td><td>Mango</td></tr>
      <tr><td>Banana</td><td>Litchi</td></tr>
      <tr><td>Mango</td><td>Litchi</td></tr>
      <tr><td>Guava</td><td>Banana</td></tr>
    </table>
  16. 16.🎯 Which element does the selector h1 style? (a) <h1 class="star"> (b) <h2> (c) <div id="intro"> (d) <li class="star">
  17. 17.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
  18. 18.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>My best friend</h2>
    <p>The red kite</p>
  19. 19.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Mango</td><td>Mango</td><td>Papaya</td></tr>
    </table>
  20. 20.🔗 Where does this link open?
    <a href="about.html" target="_blank">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  21. 21.🧭 Which semantic tag holds a side box of tips? (a) <article> (b) <main> (c) <aside> (d) <nav>
  22. 22.📊 How many cells are in each row?
    <table>
      <tr><td>Banana</td><td>Orange</td></tr>
      <tr><td>Banana</td><td>Jamun</td></tr>
      <tr><td>Mango</td><td>Guava</td></tr>
      <tr><td>Banana</td><td>Litchi</td></tr>
    </table>
  23. 23.True or false: a web server is where we type code. (a) False (b) True
  24. 24.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
  25. 25.🖌️ Which CSS property centres a heading? (a) font-weight (b) color (c) text-align (d) font-family
  26. 26.🌍 Which program shows a web page to us? (a) a music player (b) a paint program (c) a web browser (d) a calculator
  27. 27.⚡ What does this code show?
    let name = "Arjun";
    alert("Welcome, " + name + "!");
    (a) name (b) Welcome, Arjun! (c) Welcome, name! (d) Arjun
  28. 28.🏷️ Which is the closing tag for <u>? (a) <u> (b) <\u> (c) </u> (d) <u/>
  29. 29.Which of these goes in the head? (a) <table> (b) <style> (c) <p> (d) <img>
  30. 30.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) moon.png (b) dog.jpg (c) cake.jpg (d) Birthday cake
  31. 31.🔠 Which tag is the least important heading? (a) <h1> (b) <p> (c) <h6> (d) <h3>
  32. 32.Which of these is true of a code editor? (a) is where we type code (b) opens web pages for us (c) hosts websites online (d) answers page requests
  33. 33.🎯 Which element does the selector #main style? (a) <h1 class="main"> (b) <h2 class="box"> (c) <h1 id="main"> (d) <h1 id="logo">
  34. 34.🔗 Where does this link open?
    <a href="https://example.com">Maths fun</a>
    (a) in the same tab (b) in a new tab
  35. 35.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Papaya</td><td>Banana</td></tr>
    </table>
  36. 36.📊 Which tag gives the table a title? (a) <td> (b) <th> (c) <table> (d) <caption>
  37. 37.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Visit the site</a>
    (a) in the same tab (b) in a new tab
  38. 38.True or false: margin is space outside the border. (a) False (b) True
  39. 39.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  40. 40.🔍 Which is the odd one out? (a) gives the page structure (b) puts a picture on a page (c) lays out the page (d) makes a form box

Answer key

  1. False
  2. <main>
  3. reacts to a button click
  4. https
  5. 4
  6. line 3
  7. 50
  8. </h1>
  9. The red kite
  10. the screen width
  11. Cool
  12. False
  13. an id selector
  14. .js
  15. 2
  16. <h1 class="star">
  17. 3
  18. 2
  19. 3
  20. in a new tab
  21. <aside>
  22. 2
  23. False
  24. <ul>
  25. text-align
  26. a web browser
  27. Welcome, Arjun!
  28. </u>
  29. <style>
  30. cake.jpg
  31. <h6>
  32. is where we type code
  33. <h1 id="main">
  34. in the same tab
  35. 2
  36. <caption>
  37. in a new tab
  38. True
  39. a closing tag
  40. lays out the page

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