← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 736 · 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 pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="300">
  2. 2.🎨 A CSS file usually ends with which extension? (a) .html (b) .js (c) .png (d) .css
  3. 3.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) opens it in a new tab (d) hides the link
  4. 4.✍️ Which property is set to italic in this rule?
    .note {
      font-style: italic;
      color: red;
      width: 300px;
    }
    (a) font-style (b) italic (c) font-size (d) color
  5. 5.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 22px;
      }
    }
  6. 6.⚖️ What colour is the text of this element?
    <h2 class="note" id="end">Hi</h2>
    CSS:
    .note { color: white; }
    #end { color: purple; }
    (a) blue (b) white (c) purple (d) black
  7. 7.✍️ How many declarations (property: value pairs) are in this rule?
    h1 {
      width: 300px;
      border: 2px solid;
    }
  8. 8.🔗 Where does this link open?
    <a href="games.html">Play games</a>
    (a) in a new tab (b) in the same tab
  9. 9.♿ A part of the page is under a <h3> heading. Which tag should its sub-heading use? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
  10. 10.🎯 Which element does the selector li style? (a) <li class="menu"> (b) <p id="main"> (c) <span class="menu"> (d) <div>
  11. 11.True or false: HTML reacts to a button click. (a) True (b) False
  12. 12.🔁 Which word runs code only when something is true? (a) for (b) let (c) log (d) if
  13. 13.🔗 Which words do you click on?
    <a href="contact.html">Maths fun</a>
    (a) contact.html (b) href (c) Maths fun (d) Art corner
  14. 14.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) green (d) blue
  15. 15.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Mango</td><td>Grapes</td></tr>
    </table>
  16. 16.🖌️ Where does the text sit on its line?
    li {
      text-align: left;
      font-size: 16px;
      background-color: red;
      color: purple;
    }
    (a) on the left (b) in the middle (c) on the right
  17. 17.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h2> or <h1>? (a) <h1> (b) <h2> (c) <h4> (d) <h3>
  18. 18.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Grapes</td><td>Orange</td></tr>
      <tr><td>Jamun</td><td>Mango</td></tr>
      <tr><td>Banana</td><td>Mango</td></tr>
    </table>
  19. 19.⚖️ What colour is the text of this element?
    <h1 class="box" id="hero">Hi</h1>
    CSS:
    #hero { color: green; }
    h1 { color: orange; }
    .box { color: purple; }
    (a) red (b) orange (c) green (d) purple
  20. 20.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="fruit"> Mango
      <input type="radio" name="fruit"> Papaya
      <input type="radio" name="fruit"> Guava
      <input type="radio" name="fruit"> Litchi
    </form>
  21. 21.🌈 Which colour is #00ffff? (a) red (b) blue (c) black (d) cyan
  22. 22.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h1> (c) <br> (d) <h6>
  23. 23.🎯 Which element does the selector #logo style? (a) <h1 class="box"> (b) <p id="end"> (c) <p class="logo"> (d) <p id="logo">
  24. 24.🧭 Which semantic tag holds one blog post? (a) <header> (b) <main> (c) <article> (d) <nav>
  25. 25.True or false: a web server stores a website’s files. (a) False (b) True
  26. 26.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <p> (c) <table> (d) <ul>
  27. 27.True or false: .note is a class selector. (a) False (b) True
  28. 28.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
  29. 29.True or false: <img> goes in the head. (a) True (b) False
  30. 30.🔍 Which line is missing its closing tag?
    line 1: <u>Fun facts</u>
    line 2: <em>Rain today</em>
    line 3: <h2>Our school trip
    (a) line 1 (b) line 2 (c) line 3
  31. 31.✍️ Which sign goes between a property and its value? (a) - (b) ; (c) = (d) :
  32. 32.🚀 Which file should this code go in: h1 { font-size: 32px; } (a) style.css (b) script.js (c) index.html
  33. 33.🌐 Which one turns HTML into a page? (a) a web browser (b) a code editor (c) a web server
  34. 34.🔁 Which loop repeats code a set number of times? (a) else (b) let (c) for (d) if
  35. 35.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 6px;
      }
    }
  36. 36.📱 What does a media query check? (a) the page title (b) the time of day (c) the battery level (d) the screen width
  37. 37.♿ Is this heading order correct (no level skipped)?
    <h1> → <h2> → <h3> → <h2>
    (a) No (b) Yes
  38. 38.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Jamun</td><td>Mango</td></tr>
      <tr><td>Jamun</td><td>Grapes</td></tr>
    </table>
  39. 39.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 20px;
      }
    }
  40. 40.📄 Can HTML on its own make a form? (a) No (b) Yes

Answer key

  1. 300
  2. .css
  3. opens it in a new tab
  4. font-style
  5. 20
  6. purple
  7. 2
  8. in the same tab
  9. <h4>
  10. <li class="menu">
  11. False
  12. if
  13. Maths fun
  14. red
  15. 2
  16. on the left
  17. <h1>
  18. 2
  19. green
  20. 1
  21. cyan
  22. <h1>
  23. <p id="logo">
  24. <article>
  25. True
  26. <meta charset="utf-8">
  27. True
  28. 2
  29. False
  30. line 3
  31. :
  32. style.css
  33. a web browser
  34. for
  35. 6
  36. the screen width
  37. Yes
  38. 2
  39. 20
  40. Yes

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