Home → Resource

9th – Computer Science – Chapter 5 – Web Development with HTML, CSS and JavaScript

Section 1: MCQs

  1. Inside which tag is each item of an HTML list written?
    a) <it> b) <li> c) <item> d) <ld>
  2. Which symbol does an ID selector begin with in CSS?
    a) . b) & c) * d) #
  3. Which tag defines a row in an HTML table?
    a) <td> b) <tr> c) <th> d) <row>
  4. What is the process of building websites and web applications called?
    a) Web development b) Data mining c) Networking d) Troubleshooting
  5. Which tag is used to place an image on a web page?
    a) <picture only> b) <photo> c) <img> d) <image file>
  6. What is the range of HTML heading tags?
    a) <h1> to <h6> b) <h1> to <h10> c) <h0> to <h5> d) <h2> to <h8>
  7. Which tag sets the title that appears on the browser tab?
    a) <title> b) <h6> c) <p> d) <img>
  8. With which declaration does every HTML document begin?
    a) <html end> b) <start html> c) <doc html> d) <!DOCTYPE html>
  9. Which is the correct syntax of a CSS rule?
    a) selector {property: value;} b) selector: {property=value;} c) selector {property=value} d) selector: {property: value;}
  10. In which tag is the visible content of a web page placed?
    a) <body> b) <head> c) <title> d) <meta>
  11. In how much time did Brendan Eich create JavaScript?
    a) 10 days b) 10 years c) 100 days d) 5 hours
  12. Which HTML attribute is used to apply inline styles?
    a) class b) style c) font d) styles
  13. What does the src attribute specify in the <img> tag?
    a) The path of the image b) The sound of the page c) The page speed d) The font size
  14. Which markup is used for writing comments in HTML?
    a) /* */ b) /–/ c) <– d) <!– –>
  15. Which keywords are used to declare variables in JavaScript?
    a) var, let, const b) int, float, char c) dim, set, get d) new, old, temp
  16. Which of the following is not a valid HTML tag?
    a) <div> b) <span> c) <head> d) <foot>
  17. What is a developer who works on both the front-end and back-end called?
    a) Half developer b) Designer only c) Tester only d) Full-stack developer
  18. What does the alt attribute of the <img> tag provide?
    a) A text description of the image b) The image color c) The border size d) The link address
  19. Which symbol does a class selector begin with in CSS?
    a) # b) @ c) $ d) .
  20. Which HTML tag creates an unordered list?
    a) <ol> b) <ul> c) <li> d) <list>
  21. Which tag is used to insert a line break in HTML?
    a) <lb> b) <break> c) <br> d) <nl>
  22. Inside which HTML tag is JavaScript code written?
    a) <style> b) <js> c) <java> d) <script>
  23. What does HTML stand for?
    a) Hyper Text Markup Language b) High Tech Modern Language c) Home Tool Markup Language d) Hyperlink Text Making Language
  24. Which extension is used when saving an external CSS file?
    a) .css b) .html c) .js d) .doc
  25. Which CSS method is written directly inside an HTML tag?
    a) Inline style b) External style c) Internal style d) Imported style
  26. Which part of web development deals with what users see and interact with?
    a) Front-end development b) Back-end development c) Database only d) Server only
  27. CSS Flexbox is a layout tool that helps arrange items in what way?
    a) In printed pages only b) In flexible rows and columns c) In databases d) In emails only
  28. Which company later acquired Hotmail, one of the earliest web-based email services?
    a) Microsoft b) Google c) Apple d) Amazon
  29. What does back-end development manage?
    a) Only colors b) Only images c) Only fonts d) Servers, databases, and application logic
  30. Which attribute of the <a> tag specifies where a link points to?
    a) href b) src c) alt d) style
  31. What is the full form of CSS?
    a) Cascading Style Sheets b) Computer Style Sheets c) Creative Style Sheets d) Colorful Style Sheets
  32. Which tag is used to write a paragraph in HTML?
    a) <par> b) <pg> c) <p> d) <text>
  33. Which tag displays a horizontal line in HTML?
    a) <br> b) <hr> c) <line> d) <hline>
  34. Which tag defines a data cell in an HTML table?
    a) <tr> b) <td> c) <table> d) <cell>
  35. Which tag creates an ordered (numbered) list?
    a) <ul> b) <ol> c) <dl> d) <li> only
  36. Inside which tag in the head section is internal CSS written?
    a) <style> b) <css> c) <script> d) <design>
  37. Which tag is used to create a hyperlink in HTML?
    a) <link> b) <a> c) <href> d) <nav>
  38. Which of the following is a text editor used for writing HTML?
    a) MS Paint b) Notepad++ c) Calculator d) Media Player
  39. Which JavaScript function shows a popup message box?
    a) print() b) show() c) popup() d) alert()

Short Questions

Write short answers of any 25 parts of the question. (2×8=16)

(i) How do you add a comment in HTML?
(ii) How do you declare a variable in JavaScript? Give an example.
(iii) What is the purpose of the <title> tag?
(iv) Explain the difference between an ordered list and an unordered list in HTML.
(v) Write any three reasons to learn web development.
(vi) What is a function in JavaScript?
(vii) What is the difference between the <th> and <td> tags?
(viii) What is the purpose of the alt attribute in the <img> tag?
(ix) Write the use of the <p> and <br> tags.
(x) What is the function of the <div> tag in HTML?
(xi) How is an image inserted into a web page? Write an example.
(xii) What is external CSS? How is it linked to an HTML file?
(xiii) What is HTML? Why is it called a markup language?
(xiv) What is the difference between the <ol> and <ul> tags?
(xv) What is inline CSS? Give an example.
(xvi) What is the purpose of the <head> tag in HTML?
(xvii) What are the different ways to apply CSS to an HTML document?
(xviii) Write the general syntax of a CSS rule.
(xix) Describe the syntax for creating a hyperlink in HTML.
(xx) What is back-end development?
(xxi) What is an ID selector in CSS?
(xxii) How many heading levels are there in HTML? Which is the largest?
(xxiii) What is internal CSS?
(xxiv) Explain the box model in CSS.
(xxv) How can you include JavaScript in an HTML file?
(xxvi) Which tags are used to create a table in HTML?
(xxvii) What is front-end development?
(xxviii) Who is a full-stack developer?
(xxix) Name any two text editors and any two web browsers used in web development.
(xxx) What is JavaScript? Why is it used in web pages?
(xxxi) What is the purpose of the <!DOCTYPE html> declaration?
(xxxii) What is CSS? Why is it important?
(xxxiii) What is the difference between the <head> and <body> tags?
(xxxiv) What is a class selector in CSS?
(xxxv) Define web development.
(xxxvi) What does the alert() function do in JavaScript?
(xxxvii) What is CSS Grid?
(xxxviii) Write the basic structure of an HTML document.
(xxxix) What is CSS Flexbox used for?
(xl) Write the HTML code to create a link to www.example.com.
(xli) What is the use of the <table> tag in HTML?

Long Questions

  1. Explain the process of setting up a development environment for web development. By disscussing the necessary softwares and tools.
  2. Explain the process of creating a responsive web page using java script with the help of an examples.
  3. Create a basic HTML page that includes a header, a paragraph, an image, and a hyperlink.
  4. Create a table using HTML which contains 3 rows and 2 column?
  5. Describe any three CSS selectors and provide examples of each.

Answer Key

  1. b) <li>
  2. d) #
  3. b) <tr>
  4. a) Web development
  5. c) <img>
  6. a) <h1> to <h6>
  7. a) <title>
  8. d) <!DOCTYPE html>
  9. a) selector {property: value;}
  10. a) <body>
  11. a) 10 days
  12. b) style
  13. a) The path of the image
  14. d) <!– –>
  15. a) var, let, const
  16. d) <foot>
  17. d) Full-stack developer
  18. a) A text description of the image
  19. d) .
  20. b) <ul>
  21. c) <br>
  22. d) <script>
  23. a) Hyper Text Markup Language
  24. a) .css
  25. a) Inline style
  26. a) Front-end development
  27. b) In flexible rows and columns
  28. a) Microsoft
  29. d) Servers, databases, and application logic
  30. a) href
  31. a) Cascading Style Sheets
  32. c) <p>
  33. b) <hr>
  34. b) <td>
  35. b) <ol>
  36. a) <style>
  37. b) <a>
  38. b) Notepad++
  39. d) alert()

Leave a Reply

Your email address will not be published. Required fields are marked *