← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 530 · 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.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Orange</li>
    </ol>
  2. 2.True or false: HTML on its own cannot keep a high score. (a) True (b) False
  3. 3.🖌️ How big is the text, in px?
    p {
      font-size: 16px;
      text-align: right;
      color: black;
      background-color: green;
    }
  4. 4.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h2> or <h6>? (a) <h5> (b) <h2> (c) <h6> (d) <h3>
  5. 5.🔍 Which is the odd one out? (a) adds space around boxes (b) reacts to a button click (c) sets colours and fonts (d) changes the text size
  6. 6.⚖️ What colour is the text of this element?
    <h2 class="star" id="logo">Hi</h2>
    CSS:
    .star { color: white; }
    .star { color: black; }
    (a) white (b) yellow (c) orange (d) black
  7. 7.🌈 Which hex code is magenta? (a) #ff0000 (b) #00ffff (c) #0000ff (d) #ff00ff
  8. 8.⚡ Which word makes a new variable? (a) give (b) put (c) make (d) let
  9. 9.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
  10. 10.🎯 What kind of selector is #top? (a) a class selector (b) an element selector (c) an id selector
  11. 11.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) alt (d) height
  12. 12.True or false: padding is the gap round content. (a) False (b) True
  13. 13.🧩 Which language sets colours and fonts? (a) HTML (b) JavaScript (c) CSS
  14. 14.🔢 To build and share your first web page, what comes right after “write the HTML”? (a) plan what to show (b) test in a browser (c) add CSS styles (d) publish it online
  15. 15.♿ Is this heading order correct (no level skipped)?
    <h1> → <h2> → <h3> → <h5>
    (a) Yes (b) No
  16. 16.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
  17. 17.⚡ Which JavaScript word makes a new variable? (a) console.log() (b) let (c) alert() (d) if
  18. 18.✍️ Which property is set to red in this rule?
    #top {
      color: red;
      padding: 8px;
    }
    (a) color (b) red (c) font-size (d) text-align
  19. 19.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 60px;
      padding: 5px;
      border: 1px solid black;
      margin: 10px;
    }
  20. 20.♿ Does this help everyone, or make the page harder to use: use big enough text? (a) helps everyone (b) makes it harder
  21. 21.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 10 (d) 6
  22. 22.📝 How many <input> tags are in this form?
    <form>
      <input type="number">
      <input type="password">
      <input type="date">
      <input type="checkbox">
      <input type="text">
      <input type="submit" value="Send">
    </form>
  23. 23.📊 How many cells does this table have in all?
    <table>
      <tr><td>Guava</td><td>Orange</td><td>Papaya</td></tr>
      <tr><td>Guava</td><td>Jamun</td><td>Mango</td></tr>
      <tr><td>Grapes</td><td>Papaya</td><td>Mango</td></tr>
    </table>
  24. 24.🔁 How many times does this code print “Hello”?
    for (let i = 3; i <= 12; i++) {
      console.log("Hello");
    }
  25. 25.🎯 What kind of selector is .menu? (a) an element selector (b) a class selector (c) an id selector
  26. 26.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 110px;
      padding: 20px;
      border: 3px solid black;
      margin: 20px;
    }
  27. 27.Which of these is true of a code editor? (a) answers page requests (b) is where we type code (c) opens web pages for us (d) shows pages from the web
  28. 28.🔍 Which line is missing its closing tag?
    line 1: <i>Fun facts</i>
    line 2: <p>Good morning!
    line 3: <em>Our school trip</em>
    (a) line 1 (b) line 2 (c) line 3
  29. 29.🔗 Which address opens when you click this link?
    <a href="art.html">Visit the site</a>
    (a) Visit the site (b) quiz.html (c) art.html (d) news.html
  30. 30.What does text-align do? (a) makes letters bigger (b) centres a heading (c) colours behind the text (d) picks the font style
  31. 31.🌍 What is the path in this URL?
    https://www.example.com/about.html
    (a) www.example.com (b) /maths/tables.html (c) https (d) /about.html
  32. 32.💪 Which justify-content value equal gaps, none at ends? (a) flex-start (b) space-between (c) center (d) flex-end
  33. 33.🧩 Which language puts a picture on a page? (a) CSS (b) HTML (c) JavaScript
  34. 34.🔍 Which is the odd one out? (a) changes the text size (b) sets colours and fonts (c) makes headings and lists (d) rounds box corners
  35. 35.🚀 Which file should this code go in: <img src="cat.png"> (a) style.css (b) index.html (c) script.js
  36. 36.💬 How does an HTML comment end? (a) */ (b) // (c) --> (d) >>
  37. 37.🔗 Where does this link open?
    <a href="contact.html">School news</a>
    (a) in a new tab (b) in the same tab
  38. 38.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 28px;
      }
    }
  39. 39.Which of these does CSS do? (a) makes headings and lists (b) changes the page live (c) adds space around boxes (d) gives the page structure
  40. 40.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Papaya</td><td>Jamun</td><td>Grapes</td><td>Papaya</td></tr>
      <tr><td>Mango</td><td>Jamun</td><td>Jamun</td><td>Grapes</td></tr>
      <tr><td>Jamun</td><td>Guava</td><td>Litchi</td><td>Guava</td></tr>
    </table>

Answer key

  1. 5
  2. True
  3. 16
  4. <h2>
  5. reacts to a button click
  6. black
  7. #ff00ff
  8. let
  9. 100
  10. an id selector
  11. width
  12. True
  13. CSS
  14. add CSS styles
  15. No
  16. href
  17. let
  18. color
  19. 92
  20. helps everyone
  21. 6
  22. 6
  23. 9
  24. 10
  25. a class selector
  26. 156
  27. is where we type code
  28. line 2
  29. art.html
  30. centres a heading
  31. /about.html
  32. space-between
  33. HTML
  34. makes headings and lists
  35. index.html
  36. -->
  37. in the same tab
  38. 28
  39. adds space around boxes
  40. 4

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