← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 651 · 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 colour is #ffff00? (a) bright green (b) magenta (c) red (d) yellow
  2. 2.🧭 Which semantic tag helps you move around? (a) <header> (b) <footer> (c) <main> (d) <nav>
  3. 3.📦 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: 25px;
      border: 3px solid black;
      margin: 15px;
    }
  4. 4.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 150px;
      padding: 20px;
      border: 3px solid black;
      margin: 20px;
    }
  5. 5.🔗 Which address opens when you click this link?
    <a href="games.html">Contact us</a>
    (a) about.html (b) contact.html (c) Contact us (d) games.html
  6. 6.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow<br>Sky is blue</p>
  7. 7.🔢 On a typical page, from top to bottom, which comes LAST? (a) <main> (b) <nav> (c) <footer> (d) <header>
  8. 8.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>Rain today</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
  9. 9.True or false: <ol> is an ordered list. (a) False (b) True
  10. 10.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
  11. 11.What does justify-content: space-between do? (a) puts boxes in the middle (b) equal gaps, none at ends (c) packs boxes at the start (d) packs boxes at the end
  12. 12.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="300">
  13. 13.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) nowhere (d) at the bottom
  14. 14.True or false: a code editor answers page requests. (a) True (b) False
  15. 15.🚀 Which file should this code go in: p { color: red; } (a) index.html (b) style.css (c) script.js
  16. 16.🖌️ Where does the text sit on its line?
    h1 {
      text-align: right;
      color: orange;
      background-color: yellow;
      font-size: 20px;
    }
    (a) in the middle (b) on the left (c) on the right
  17. 17.🔍 One closing tag is missing. Which one?
    <i>Rain today</i>
    <h2>The red kite</h2>
    <b>Cricket is fun.
    (a) </b> (b) </i> (c) </p> (d) </h2>
  18. 18.True or false: <header> holds the logo and title. (a) True (b) False
  19. 19.True or false: p is an element selector. (a) False (b) True
  20. 20.🔢 To build and share your first web page, which comes LAST? (a) publish it online (b) plan what to show (c) add CSS styles (d) test in a browser
  21. 21.True or false: a web browser stores a website’s files. (a) True (b) False
  22. 22.♿ Does this help everyone, or make the page harder to use: colour as the only clue? (a) makes it harder (b) helps everyone
  23. 23.💬 How does an HTML comment end? (a) >> (b) --> (c) */ (d) //
  24. 24.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
  25. 25.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  26. 26.What is <input type="email"> for? (a) picks a day (b) is for an email address (c) takes only numbers (d) is for one line of words
  27. 27.⚖️ Which selector is the weakest? (a) an element selector (b) a class selector (c) an id selector
  28. 28.True or false: alert("Hi"); goes in script.js. (a) False (b) True
  29. 29.✍️ What value is given to font-weight in this rule?
    p {
      padding: 8px;
      font-style: italic;
      font-weight: bold;
    }
    (a) font-weight (b) bold (c) 300px (d) 2px solid
  30. 30.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Orange</td><td>Grapes</td><td>Papaya</td><td>Grapes</td></tr>
      <tr><td>Jamun</td><td>Guava</td><td>Orange</td><td>Jamun</td></tr>
      <tr><td>Jamun</td><td>Grapes</td><td>Litchi</td><td>Papaya</td></tr>
    </table>
  31. 31.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
    (a) Cricket is fun. (b) Good morning! (c) My pets
  32. 32.💪 Which flexbox property lines boxes up across? (a) display: flex (b) gap (c) flex-direction (d) align-items
  33. 33.✍️ How many declarations (property: value pairs) are in this rule?
    body {
      background-color: yellow;
      text-align: center;
      font-size: 20px;
    }
  34. 34.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
  35. 35.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  36. 36.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="300">
    (a) bus.jpg (b) moon.png (c) The full moon (d) fort.jpg
  37. 37.🔁 How many times does this code print “Hi”?
    for (let i = 1; i < 8; i++) {
      console.log("Hi");
    }
  38. 38.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="250">
    (a) width (b) Map of India (c) A red kite (d) kite.png
  39. 39.🎯 Which element does the selector .note style? (a) <p class="red"> (b) <span id="note"> (c) <span class="note"> (d) <span class="big">
  40. 40.🖌️ How big is the text, in px?
    li {
      background-color: green;
      text-align: right;
      color: blue;
      font-size: 12px;
    }

Answer key

  1. yellow
  2. <nav>
  3. 166
  4. 236
  5. games.html
  6. 3
  7. <footer>
  8. 3
  9. True
  10. href
  11. equal gaps, none at ends
  12. 300
  13. on the browser tab
  14. False
  15. style.css
  16. on the right
  17. </b>
  18. True
  19. True
  20. publish it online
  21. False
  22. makes it harder
  23. -->
  24. <a href="about.html">
  25. an opening tag
  26. is for an email address
  27. an element selector
  28. True
  29. bold
  30. 16
  31. Cricket is fun.
  32. align-items
  33. 3
  34. <a>
  35. in the head
  36. moon.png
  37. 7
  38. A red kite
  39. <span class="note">
  40. 12

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