← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 799 · 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.🖌️ Where does the text sit on its line?
    h1 {
      background-color: red;
      text-align: left;
      color: yellow;
      font-size: 24px;
    }
    (a) on the left (b) in the middle (c) on the right
  2. 2.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <p>Good morning!</p>
    (a) Fun facts (b) Hello, world! (c) Good morning! (d) My pets
  3. 3.Which of these is true of a web server? (a) shows pages from the web (b) turns HTML into a page (c) hosts websites online (d) shows line numbers
  4. 4.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>My pets</p>
    <h2>Rain today</h2>
    <h2>The red kite</h2>
    <h2>Good morning!</h2>
    <p>I love mangoes.</p>
  5. 5.🔁 How many times does this code print “Well done”?
    for (let i = 0; i <= 9; i++) {
      console.log("Well done");
    }
  6. 6.🚀 Which tag loads script.js into a page? (a) <script src="script.js"> (b) <link script.js> (c) <js src="script.js"> (d) <a href="script.js">
  7. 7.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h1> or <h2>? (a) <h4> (b) <h6> (c) <h1> (d) <h2>
  8. 8.🌍 What is the domain name in this URL?
    https://kids.example.org/maths/tables.html
    (a) /maths/tables.html (b) school.example.in (c) https (d) kids.example.org
  9. 9.True or false: <footer> sits at the bottom. (a) True (b) False
  10. 10.📊 Are <th> cells shown bold and centred by default? (a) No (b) Yes
  11. 11.🌍 What is the domain name in this URL?
    https://kids.example.org/about.html
    (a) https (b) /about.html (c) school.example.in (d) kids.example.org
  12. 12.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="400">
    (a) map.png (b) width (c) Birthday cake (d) Map of India
  13. 13.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Our school trip</p>
    <p>My pets</p>
    (a) My pets (b) The red kite (c) Our school trip
  14. 14.⚡ What number does this code print?
    let a = 4;
    let b = 3;
    console.log(a * b);
  15. 15.🔢 In a basic web page file, which comes first: “</head>” or “<html>”? (a) </head> (b) <html>
  16. 16.True or false: to download from pop-ups is safe. (a) True (b) False
  17. 17.✍️ How many declarations (property: value pairs) are in this rule?
    h2 {
      padding: 8px;
      color: red;
    }
  18. 18.🔒 Is the connection to this address scrambled (encrypted)?
    https://www.example.net/maths/tables.html
    (a) Yes (b) No
  19. 19.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ul>
  20. 20.🧩 Which language sets colours and fonts? (a) JavaScript (b) CSS (c) HTML
  21. 21.True or false: <input type="password"> lets you pick only one. (a) True (b) False
  22. 22.🔗 Which address opens when you click this link?
    <a href="about.html">Art corner</a>
    (a) contact.html (b) Art corner (c) about.html (d) https://example.com
  23. 23.💪 Which flexbox property lines boxes up across? (a) flex-direction (b) align-items (c) justify-content (d) display: flex
  24. 24.True or false: in <img>, width sets how tall it is. (a) False (b) True
  25. 25.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h2>? (a) <h3> (b) <h4> (c) <h6> (d) <h2>
  26. 26.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Easy snacks (b) Try this poha. (c) Class 7 Blog (d) index.html
  27. 27.✍️ Which property is set to 8px in this rule?
    .box {
      padding: 8px;
      background-color: yellow;
      font-size: 20px;
    }
    (a) font-weight (b) border (c) padding (d) 8px
  28. 28.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  29. 29.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
  30. 30.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Jamun</td><td>Jamun</td></tr>
      <tr><td>Grapes</td><td>Guava</td></tr>
      <tr><td>Jamun</td><td>Papaya</td></tr>
    </table>
  31. 31.Which of these is padding? (a) the line round the box (b) a solid or dotted edge (c) the gap round content (d) space outside the border
  32. 32.📊 How many cells does this table have in all?
    <table>
      <tr><td>Litchi</td><td>Mango</td><td>Jamun</td></tr>
      <tr><td>Grapes</td><td>Orange</td><td>Banana</td></tr>
      <tr><td>Litchi</td><td>Litchi</td><td>Mango</td></tr>
    </table>
  33. 33.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Fun facts</p>
    <h3>I love mangoes.</h3>
    <p>The red kite</p>
    <h3>Fun facts</h3>
  34. 34.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Orange</td><td>Mango</td><td>Litchi</td></tr>
    </table>
  35. 35.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
  36. 36.🔁 What does i++ do? (a) adds 1 to i (b) doubles i (c) prints i (d) takes 1 from i
  37. 37.🌈 Which hex code is blue? (a) #000000 (b) #0000ff (c) #00ff00 (d) #ffff00
  38. 38.⚡ Which tag holds JavaScript in a page? (a) <script> (b) <style> (c) <code> (d) <js>
  39. 39.Which of these is the border? (a) space inside the border (b) the gap to other boxes (c) the text or picture (d) a solid or dotted edge
  40. 40.⚖️ What colour is the text of this element?
    <h2 class="note" id="top">Hi</h2>
    CSS:
    #top { color: red; }
    #top { color: yellow; }
    (a) red (b) green (c) yellow (d) blue

Answer key

  1. on the left
  2. My pets
  3. hosts websites online
  4. 3
  5. 10
  6. <script src="script.js">
  7. <h6>
  8. kids.example.org
  9. True
  10. Yes
  11. kids.example.org
  12. Map of India
  13. The red kite
  14. 12
  15. <html>
  16. False
  17. 2
  18. Yes
  19. 5
  20. CSS
  21. False
  22. about.html
  23. align-items
  24. False
  25. <h6>
  26. Class 7 Blog
  27. padding
  28. No
  29. a code editor
  30. 2
  31. the gap round content
  32. 9
  33. 3
  34. 6
  35. to leave notes
  36. adds 1 to i
  37. #0000ff
  38. <script>
  39. a solid or dotted edge
  40. yellow

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