← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 580 · 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 tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
  2. 2.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Grapes</li>
    </ul>
    (a) bullets (b) numbers
  3. 3.🔁 How many times does this code print “Hello”?
    for (let i = 0; i <= 7; i++) {
      console.log("Hello");
    }
  4. 4.True or false: console.log(5 + 2); goes in script.js. (a) False (b) True
  5. 5.🎯 Which element does the selector .box style? (a) <li class="box"> (b) <li class="star"> (c) <li id="box"> (d) <div class="menu">
  6. 6.True or false: a code editor is where we type code. (a) False (b) True
  7. 7.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 550px;
      justify-content: space-between;
    }
    Inside are 4 boxes, each 100px wide (no margins).
  8. 8.🔁 How many times does this code print “Welcome”?
    for (let i = 1; i < 5; i++) {
      console.log("Welcome");
    }
  9. 9.📝 Which tag gives a form box a name you can click? (a) <label> (b) <title> (c) <h1> (d) <hr>
  10. 10.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) alt (d) width
  11. 11.🔢 To build and share your first web page, which comes LAST? (a) write the HTML (b) plan what to show (c) publish it online (d) add CSS styles
  12. 12.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Grapes</td><td>Guava</td><td>Jamun</td></tr>
      <tr><td>Grapes</td><td>Jamun</td><td>Guava</td></tr>
    </table>
  13. 13.✍️ Which property is set to 8px in this rule?
    #top {
      font-style: italic;
      padding: 8px;
      color: red;
    }
    (a) border (b) font-weight (c) padding (d) 8px
  14. 14.🌗 Is dark grey on white easy or hard to read? (a) easy to read (b) hard to read
  15. 15.💪 Which flexbox property turns on flexbox? (a) flex-direction (b) justify-content (c) gap (d) display: flex
  16. 16.⚡ What does this code show?
    let name = "Aman";
    console.log("Welcome, " + name + "!");
    (a) Aman (b) name (c) Welcome, Aman! (d) Welcome, name!
  17. 17.🧩 Which language sets colours and fonts? (a) CSS (b) HTML (c) JavaScript
  18. 18.📦 In the box model, which part is the gap to other boxes? (a) content (b) padding (c) margin (d) border
  19. 19.Which of these is true of a web browser? (a) saves our .html files (b) colours code to help us (c) turns HTML into a page (d) is where we type code
  20. 20.True or false: HTML on its own can keep a high score. (a) False (b) True
  21. 21.✍️ Which sign goes between a property and its value? (a) : (b) = (c) - (d) ;
  22. 22.🖼️ Which attribute of <img> describes the picture? (a) src (b) width (c) height (d) alt
  23. 23.✍️ Which property is set to 2px solid in this rule?
    .box {
      border: 2px solid;
      background-color: yellow;
    }
    (a) font-style (b) border (c) width (d) 2px solid
  24. 24.⚡ What does this code show?
    let name = "Riya";
    alert("Well done, " + name + "!");
    (a) Well done, name! (b) Riya (c) name (d) Well done, Riya!
  25. 25.True or false: a web browser saves our .html files. (a) True (b) False
  26. 26.🖌️ Which CSS property colours behind the text? (a) background-color (b) text-align (c) color (d) font-size
  27. 27.Which of these is an empty tag? (a) <input> (b) <p> (c) <ul> (d) <b>
  28. 28.📊 Where do <td> cells go? (a) inside a <li> (b) inside the <head> (c) inside a <tr> (d) inside a <p>
  29. 29.🧭 Is <header> semantic or not semantic? (a) semantic (b) not semantic
  30. 30.📊 Which tag gives the table a title? (a) <caption> (b) <td> (c) <tr> (d) <th>
  31. 31.Which colour pair is easy to read? (a) light grey on white (b) pink on red (c) black on white (d) yellow on white
  32. 32.🌍 What is the protocol in this URL?
    http://school.example.in/news/today.html
    (a) http (b) https (c) /news/today.html (d) school.example.in
  33. 33.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) < (d) (
  34. 34.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
  35. 35.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  36. 36.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
  37. 37.✍️ What is the selector in this CSS rule?
    li {
      width: 300px;
      color: red;
      background-color: yellow;
    }
    (a) body (b) red (c) li (d) width
  38. 38.Which of these is true of <article>? (a) holds a news story (b) sits at the bottom (c) sits at the very top (d) holds a side box of tips
  39. 39.🧩 Which language lays out the page? (a) JavaScript (b) HTML (c) CSS
  40. 40.📝 Which input type is for one line of words? (a) text (b) radio (c) date (d) submit

Answer key

  1. <ul>
  2. bullets
  3. 8
  4. True
  5. <li class="box">
  6. True
  7. 50
  8. 4
  9. <label>
  10. width
  11. publish it online
  12. 3
  13. padding
  14. easy to read
  15. display: flex
  16. Welcome, Aman!
  17. CSS
  18. margin
  19. turns HTML into a page
  20. False
  21. :
  22. alt
  23. border
  24. Well done, Riya!
  25. False
  26. background-color
  27. <input>
  28. inside a <tr>
  29. semantic
  30. <caption>
  31. black on white
  32. http
  33. <
  34. 1
  35. True
  36. a code editor
  37. li
  38. holds a news story
  39. CSS
  40. text

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