← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 581 · 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.📱 The screen is 540px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 10px;
      }
    }
    (a) No (b) Yes
  2. 2.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h1> or <h6>? (a) <h4> (b) <h1> (c) <h2> (d) <h6>
  3. 3.📝 Which input type takes only numbers? (a) checkbox (b) text (c) radio (d) number
  4. 4.True or false: <link rel="stylesheet"> goes in the head. (a) False (b) True
  5. 5.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h5> or <h6>? (a) <h3> (b) <h1> (c) <h5> (d) <h6>
  6. 6.📱 What does a media query check? (a) the page title (b) the screen width (c) the time of day (d) the battery level
  7. 7.Which of these is true of a code editor? (a) turns HTML into a page (b) has an address bar (c) opens web pages for us (d) is where we type code
  8. 8.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h6>? (a) <h1> (b) <h2> (c) <h5> (d) <h6>
  9. 9.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) My drawings (c) Class 7 Blog (d) body
  10. 10.True or false: <input type="password"> picks a day. (a) True (b) False
  11. 11.True or false: the browser sends the page back. (a) False (b) True
  12. 12.True or false: in <img>, alt is read by screen readers. (a) False (b) True
  13. 13.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 360px;
      justify-content: space-between;
    }
    Inside are 4 boxes, each 60px wide (no margins).
  14. 14.⚡ What number does this code print?
    let coins = 5;
    coins = coins + 10;
    coins = coins - 15;
    console.log(coins);
  15. 15.⚖️ What colour is the text of this element?
    <h1 class="menu" id="main">Hi</h1>
    CSS:
    .menu { color: black; }
    #main { color: red; }
    (a) red (b) blue (c) black (d) white
  16. 16.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) Thanks for visiting. (c) Match report (d) body
  17. 17.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  18. 18.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 80px;
      padding: 20px;
      border: 2px solid black;
      margin: 5px;
    }
  19. 19.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) Match report (c) Space Facts (d) index.html
  20. 20.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  21. 21.What is <input type="text"> for? (a) is for one line of words (b) sends the form (c) lets you pick only one (d) hides what you type
  22. 22.🧭 Is <article> semantic or not semantic? (a) not semantic (b) semantic
  23. 23.🚀 Should file names have spaces, like my page.html? (a) Yes (b) No
  24. 24.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as a dot (c) as one space (d) as 5 spaces
  25. 25.♿ Does this help everyone, or make the page harder to use: colour as the only clue? (a) helps everyone (b) makes it harder
  26. 26.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
  27. 27.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h5> or <h2>? (a) <h3> (b) <h2> (c) <h1> (d) <h5>
  28. 28.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) width (d) src
  29. 29.📊 How many cells are in each row?
    <table>
      <tr><td>Guava</td><td>Banana</td><td>Jamun</td><td>Jamun</td></tr>
      <tr><td>Mango</td><td>Guava</td><td>Grapes</td><td>Banana</td></tr>
    </table>
  30. 30.⚖️ Which selector is the weakest? (a) a class selector (b) an element selector (c) an id selector
  31. 31.🔍 One closing tag is missing. Which one?
    <small>Fun facts
    <h1>Rain today</h1>
    <strong>I love mangoes.</strong>
    (a) </small> (b) </em> (c) </strong> (d) </h1>
  32. 32.📱 The screen is 320px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 18px;
      }
    }
    (a) No (b) Yes
  33. 33.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Mango</li>
      <li>Grapes</li>
    </ul>
    (a) bullets (b) numbers
  34. 34.🔁 How many times does this code print “Hi”?
    for (let i = 1; i < 10; i++) {
      console.log("Hi");
    }
  35. 35.Which of these is an empty tag? (a) <li> (b) <ul> (c) <b> (d) <meta>
  36. 36.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) an attribute (d) a closing tag
  37. 37.🌈 In #0000de the blue part is the hex number de. What is it as a normal number?
  38. 38.⚖️ What colour is the text of this element?
    <p class="note" id="intro">Hi</p>
    CSS:
    .note { color: purple; }
    .note { color: blue; }
    (a) red (b) green (c) purple (d) blue
  39. 39.✍️ Which property is set to 10px in this rule?
    li {
      margin: 10px;
      color: red;
    }
    (a) font-weight (b) 10px (c) margin (d) padding
  40. 40.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Guava</td><td>Mango</td></tr>
      <tr><td>Banana</td><td>Litchi</td></tr>
      <tr><td>Banana</td><td>Guava</td></tr>
    </table>

Answer key

  1. Yes
  2. <h6>
  3. number
  4. True
  5. <h6>
  6. the screen width
  7. is where we type code
  8. <h1>
  9. My drawings
  10. False
  11. False
  12. True
  13. 40
  14. 0
  15. red
  16. Match report
  17. a closing tag
  18. 134
  19. Space Facts
  20. has a closing tag
  21. is for one line of words
  22. semantic
  23. No
  24. as one space
  25. makes it harder
  26. <li>
  27. <h1>
  28. alt
  29. 4
  30. an element selector
  31. </small>
  32. Yes
  33. bullets
  34. 9
  35. <meta>
  36. an attribute
  37. 222
  38. blue
  39. margin
  40. 2

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