← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 350 · 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.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <br> (c) <hr> (d) <ul>
  2. 2.True or false: to type a password on http is not safe. (a) False (b) True
  3. 3.⚡ What does this code show?
    let name = "Aman";
    console.log("Hi, " + name + "!");
    (a) Aman (b) Hi, name! (c) Hi, Aman! (d) name
  4. 4.True or false: <li> lists things in any order. (a) False (b) True
  5. 5.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) attribute (d) element
  6. 6.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
    <p>Good morning!</p>
    (a) Good morning! (b) My best friend (c) The red kite
  7. 7.✍️ Which property is set to yellow in this rule?
    h2 {
      background-color: yellow;
      border: 2px solid;
      font-weight: bold;
    }
    (a) yellow (b) background-color (c) padding (d) margin
  8. 8.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) alt (c) src (d) width
  9. 9.True or false: <title> goes in the head. (a) False (b) True
  10. 10.Which of these does CSS do? (a) counts down a timer (b) gives the page structure (c) changes the text size (d) makes a form box
  11. 11.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>The red kite</p>
    <p>My pets</p>
  12. 12.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="400">
    (a) map.png (b) cake.jpg (c) kite.png (d) A red kite
  13. 13.🌈 In #000021 the blue part is the hex number 21. What is it as a normal number?
  14. 14.🔍 Which line is missing its closing tag?
    line 1: <h1>Rain today</h1>
    line 2: <small>Good morning!</small>
    line 3: <u>The red kite
    (a) line 3 (b) line 2 (c) line 1
  15. 15.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>The red kite</p>
    <p>Our school trip</p>
    <p>My pets</p>
    (a) I love mangoes. (b) Our school trip (c) The red kite (d) My pets
  16. 16.⚡ Which JavaScript word writes in the console? (a) let (b) console.log() (c) if (d) for
  17. 17.True or false: HTML makes a form box. (a) False (b) True
  18. 18.📱 The screen is 414px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 24px;
      }
    }
  19. 19.🎯 Can many elements share the same class? (a) No (b) Yes
  20. 20.🌍 What does a web address (URL) tell the browser? (a) how old you are (b) where the page is (c) the page colour (d) your password
  21. 21.🔗 Where does this link open?
    <a href="art.html">Maths fun</a>
    (a) in a new tab (b) in the same tab
  22. 22.🚀 Which tag loads script.js into a page? (a) <a href="script.js"> (b) <script src="script.js"> (c) <link script.js> (d) <js src="script.js">
  23. 23.What does justify-content: flex-start do? (a) packs boxes at the end (b) puts boxes in the middle (c) equal gaps, none at ends (d) packs boxes at the start
  24. 24.🌍 What is the protocol in this URL?
    http://learn.example.com/news/today.html
    (a) learn.example.com (b) https (c) /news/today.html (d) http
  25. 25.True or false: <style> goes in the head. (a) True (b) False
  26. 26.True or false: .box { padding: 8px; } goes in script.js. (a) False (b) True
  27. 27.🛡️ Is it safe to use the same password on every site? (a) Yes (b) No
  28. 28.True or false: #hero is a class selector. (a) True (b) False
  29. 29.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 220px;
      padding: 5px;
      border: 1px solid black;
      margin: 5px;
    }
  30. 30.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>My pets</p>
    <!-- <p>I love mangoes.</p> -->
  31. 31.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Guava</li>
    </ol>
  32. 32.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 50px;
      padding: 5px;
      border: 4px solid black;
      margin: 0px;
    }
  33. 33.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Birds sing<br>Sky is blue</p>
  34. 34.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) Home Text (c) HyperText (d) Hot Tags
  35. 35.🚀 Which file should this code go in: <p>Hello!</p> (a) style.css (b) script.js (c) index.html
  36. 36.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 28px;
      }
    }
  37. 37.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ul>
    (a) bullets (b) numbers
  38. 38.📱 Responsive design means a page ___. (a) is only for laptops (b) has no pictures (c) never changes (d) fits every screen
  39. 39.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  40. 40.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as a new line (c) as 5 spaces (d) as one space

Answer key

  1. <ol>
  2. True
  3. Hi, Aman!
  4. False
  5. element
  6. The red kite
  7. background-color
  8. width
  9. True
  10. changes the text size
  11. 1
  12. kite.png
  13. 33
  14. line 3
  15. I love mangoes.
  16. console.log()
  17. True
  18. 16
  19. Yes
  20. where the page is
  21. in the same tab
  22. <script src="script.js">
  23. packs boxes at the start
  24. http
  25. True
  26. False
  27. No
  28. False
  29. 242
  30. 1
  31. 3
  32. 68
  33. 3
  34. HyperText
  35. index.html
  36. 20
  37. bullets
  38. fits every screen
  39. Yes
  40. as one space

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