← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 253 · 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.True or false: to ask before downloading is safe. (a) True (b) False
  2. 2.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) magenta (c) bright green (d) blue
  3. 3.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h2>? (a) <h2> (b) <h3> (c) <h6> (d) <h1>
  4. 4.🛡️ Online: is it safe to keep passwords secret? (a) safe (b) not safe
  5. 5.💬 Does the browser show comments on the page? (a) No (b) Yes
  6. 6.📝 Which input type hides what you type? (a) password (b) checkbox (c) date (d) number
  7. 7.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) All about me (b) We won by 5 runs. (c) body (d) Space Facts
  8. 8.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  9. 9.🔢 To build and share your first web page, which comes first: “publish it online” or “plan what to show”? (a) plan what to show (b) publish it online
  10. 10.True or false: <img src="cat.png"> goes in index.html. (a) False (b) True
  11. 11.🔁 When does the else part run? (a) always (b) when if is true (c) when if is false (d) never
  12. 12.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Birds sing</p>
  13. 13.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  14. 14.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  15. 15.🛡️ Before typing a password on a site, check the address starts with ___. (a) ftp (b) www (c) https (d) http
  16. 16.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) My drawings (b) Space Facts (c) Mars is red. (d) index.html
  17. 17.🌍 What is the protocol in this URL?
    https://learn.example.com/index.html
    (a) learn.example.com (b) https (c) /index.html (d) http
  18. 18.🔢 To build and share your first web page, which comes FIRST? (a) write the HTML (b) plan what to show (c) add CSS styles (d) publish it online
  19. 19.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  20. 20.💪 Which flexbox property spaces boxes along a row? (a) flex-direction (b) justify-content (c) align-items (d) gap
  21. 21.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="400">
    (a) cake.jpg (b) dog.jpg (c) Map of India (d) map.png
  22. 22.⚖️ Which selector is the weakest? (a) an id selector (b) an element selector (c) a class selector
  23. 23.🌗 Is yellow on white easy or hard to read? (a) easy to read (b) hard to read
  24. 24.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  25. 25.🎯 What kind of selector is p? (a) an element selector (b) an id selector (c) a class selector
  26. 26.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Hello, world! (b) Fun facts (c) Cricket is fun. (d) I love mangoes.
  27. 27.What is <input type="text"> for? (a) hides what you type (b) takes only numbers (c) is for an email address (d) is for one line of words
  28. 28.📦 In the box model, which part is a solid or dotted edge? (a) padding (b) border (c) margin (d) content
  29. 29.🖌️ What colour are the letters?
    h2 {
      text-align: center;
      font-size: 40px;
      background-color: yellow;
      color: white;
    }
    (a) green (b) yellow (c) white
  30. 30.📊 How many cells are in each row?
    <table>
      <tr><td>Jamun</td><td>Mango</td><td>Guava</td></tr>
      <tr><td>Banana</td><td>Guava</td><td>Jamun</td></tr>
      <tr><td>Grapes</td><td>Mango</td><td>Mango</td></tr>
    </table>
  31. 31.📊 Are <th> cells shown bold and centred by default? (a) No (b) Yes
  32. 32.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) index.html (c) I like to read. (d) Easy snacks
  33. 33.🔁 What does this code print?
    let score = 28;
    if (score > 27) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) Play again (b) You win
  34. 34.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Papaya</li>
    </ol>
    (a) numbers (b) bullets
  35. 35.True or false: <input type="password"> hides what you type. (a) False (b) True
  36. 36.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="200">
  37. 37.🧩 Which language puts a picture on a page? (a) HTML (b) CSS (c) JavaScript
  38. 38.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <style> (d) <a>
  39. 39.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) height (c) src (d) alt
  40. 40.💪 Which flexbox property turns on flexbox? (a) display: flex (b) flex-direction (c) gap (d) justify-content

Answer key

  1. True
  2. blue
  3. <h6>
  4. safe
  5. No
  6. password
  7. All about me
  8. in the body
  9. plan what to show
  10. True
  11. when if is false
  12. 2
  13. an empty tag
  14. an opening tag
  15. https
  16. Space Facts
  17. https
  18. plan what to show
  19. in the head
  20. justify-content
  21. map.png
  22. an element selector
  23. hard to read
  24. <ul>
  25. an element selector
  26. Cricket is fun.
  27. is for one line of words
  28. border
  29. white
  30. 3
  31. Yes
  32. Riya’s Recipes
  33. You win
  34. numbers
  35. True
  36. 200
  37. HTML
  38. <a>
  39. height
  40. display: flex

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