← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 520 · 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: to click prize links is safe. (a) False (b) True
  2. 2.⚡ What does this code show?
    let name = "Meera";
    alert("Hello, " + name + "!");
    (a) Meera (b) name (c) Hello, Meera! (d) Hello, name!
  3. 3.📊 Which tag makes a heading cell? (a) <tr> (b) <caption> (c) <th> (d) <td>
  4. 4.🌍 What is the path in this URL?
    http://www.example.net/about.html
    (a) www.example.net (b) /about.html (c) /maths/tables.html (d) http
  5. 5.True or false: <input type="text"> is for one line of words. (a) False (b) True
  6. 6.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) Welcome! (c) index.html (d) Thanks for visiting.
  7. 7.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) address (d) editor
  8. 8.🌐 Which one hosts websites online? (a) a code editor (b) a web browser (c) a web server
  9. 9.🎨 Which attribute adds CSS inside one tag? (a) src (b) style (c) href (d) alt
  10. 10.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) black (c) white (d) bright green
  11. 11.True or false: <li> is an ordered list. (a) False (b) True
  12. 12.🔢 When you open a web page, what comes right after “the browser asks it”? (a) the server sends files (b) the browser shows it (c) you type the URL (d) DNS finds the server
  13. 13.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  14. 14.📊 How many rows does this table have?
    <table>
      <tr><td>Jamun</td><td>Papaya</td><td>Banana</td><td>Orange</td></tr>
      <tr><td>Banana</td><td>Grapes</td><td>Banana</td><td>Litchi</td></tr>
    </table>
  15. 15.⚖️ Which selector is the weakest? (a) an element selector (b) a class selector (c) an id selector
  16. 16.🔗 Which address opens when you click this link?
    <a href="about.html">Maths fun</a>
    (a) about.html (b) https://example.com (c) contact.html (d) Maths fun
  17. 17.📊 How many cells are in each row?
    <table>
      <tr><td>Banana</td><td>Litchi</td><td>Banana</td><td>Grapes</td></tr>
      <tr><td>Jamun</td><td>Banana</td><td>Grapes</td><td>Mango</td></tr>
    </table>
  18. 18.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <meta charset="utf-8"> (c) <p> (d) <title>
  19. 19.True or false: a web server stores a website’s files. (a) False (b) True
  20. 20.✍️ What value is given to margin in this rule?
    h1 {
      color: red;
      margin: 10px;
      background-color: yellow;
      font-size: 20px;
    }
    (a) bold (b) 8px (c) margin (d) 10px
  21. 21.🎯 What kind of selector is .big? (a) an element selector (b) an id selector (c) a class selector
  22. 22.♿ Is this heading order correct (no level skipped)?
    <h1> → <h2> → <h4> → <h3>
    (a) Yes (b) No
  23. 23.✍️ How many declarations (property: value pairs) are in this rule?
    h2 {
      color: red;
      font-style: italic;
      text-align: center;
      width: 300px;
    }
  24. 24.Which of these goes in the head? (a) <style> (b) <a> (c) <ul> (d) <h1>
  25. 25.True or false: in <img>, src tells which image to load. (a) True (b) False
  26. 26.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 250px;
      justify-content: flex-start;
    }
    Inside are 4 boxes, each 60px wide (no margins).
  27. 27.📝 Which tag makes a drop-down list? (a) <ul> (b) <select> (c) <ol> (d) <li>
  28. 28.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Cricket Club (b) index.html (c) Easy snacks (d) Thanks for visiting.
  29. 29.🔁 What does this code print?
    let score = 25;
    if (score >= 33) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) You win (b) Play again
  30. 30.True or false: <li> goes inside ul or ol. (a) False (b) True
  31. 31.True or false: the browser asks for a web page. (a) False (b) True
  32. 32.🖌️ What colour is behind the letters?
    p {
      color: purple;
      text-align: right;
      font-size: 28px;
      background-color: green;
    }
    (a) purple (b) green (c) orange
  33. 33.🔢 On a typical page, from top to bottom, what comes right after “<nav>”? (a) <header> (b) <main> (c) <footer>
  34. 34.♿ Does this help everyone, or make the page harder to use: images with no alt? (a) makes it harder (b) helps everyone
  35. 35.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 200px;
      padding: 20px;
      border: 3px solid black;
      margin: 5px;
    }
  36. 36.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Good morning!</p>
    <p>Rain today</p>
    (a) I love mangoes. (b) Rain today (c) Good morning!
  37. 37.🌈 Which colour of light is strongest in rgb(169, 41, 42)? (a) red (b) green (c) blue
  38. 38.🔗 Which words do you click on?
    <a href="news.html">Art corner</a>
    (a) Art corner (b) School news (c) href (d) news.html
  39. 39.🚀 Should file names have spaces, like my page.html? (a) No (b) Yes
  40. 40.True or false: to use a strong password is not safe. (a) True (b) False

Answer key

  1. False
  2. Hello, Meera!
  3. <th>
  4. /about.html
  5. True
  6. Class 7 Blog
  7. element
  8. a web server
  9. style
  10. black
  11. False
  12. the server sends files
  13. Yes
  14. 2
  15. an element selector
  16. about.html
  17. 4
  18. <p>
  19. True
  20. 10px
  21. a class selector
  22. No
  23. 4
  24. <style>
  25. True
  26. 10
  27. <select>
  28. Cricket Club
  29. Play again
  30. True
  31. True
  32. green
  33. <main>
  34. makes it harder
  35. 246
  36. I love mangoes.
  37. red
  38. Art corner
  39. No
  40. False

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