Top 30 MCQs for Bihar STET Exam: Master Unit 10 - Web-Based Application Development

 Top 30 MCQs for Bihar STET Exam: Master Unit 10 - Web-Based Application Development

Unit 10: Web-Based Application Development 

👉 Internet Basics

👉 Introduction to Web Development, 

👉 Node.js and Git, 

👉  HTML, CSS, JQuery, 

👉  JavaScript and HTTP (forms), 

👉  Sessions and HTTP,  

👉  Javascript & Document Object Model – DOM, 

👉  Extensible Markup Language – XML, 

👉  Document Type Definition - DTD Dreamweaver, 

👉  PHP HyperText PreProcessor - PHP SQL & MySQL, 

👉  Integrating PHP and MySQL,Database Interaction

-----------------------------------------

1. What is the primary function of a web browser?

a) To store website data

b) To retrieve, present, and traverse information on the World Wide Web

c) To manage server-side scripting

d) To create dynamic web content

Answer: b

 Explanation: A web browser retrieves and displays web content using HTTP/HTTPS protocols, allowing users to interact with websites.

2. What does URL stand for?

a) Uniform Resource Locator

b) Universal Reference Link

c) Uniform Retrieval Language

d) Universal Resource Language

Answer: a

Explanation: A URL is a standardized address for resources on the internet, specifying the location and protocol (e.g., HTTP).

3. Which of the following is a collection of tools and techniques used to create content for the World Wide Web?

a) Web hosting

b) Web technology

c) Web server

d) Web database

Answer: b

Explanation: Web technology encompasses tools like HTML, CSS, JavaScript, and server-side languages for creating and delivering web content.

4. Which layer of a web application deals with user interaction?

a) Data layer

b) Business logic layer

c) Presentation layer

d) Database layer

Answer: c

Explanation: The presentation layer handles user interaction, typically through front-end technologies like HTML, CSS, and JavaScript.

5. What is Node.js primarily used for?

a) Styling web pages

b) Server-side JavaScript execution

c) Managing databases

d) Creating static HTML pages

Answer: b

Explanation: Node.js is a runtime environment that allows JavaScript to run on the server side, enabling scalable web applications.

6. Which Git command is used to save changes to the local repository?

a) git push

b) git commit

c) git pull

d) git clone

Answer: b

Explanation: The git commit command saves changes to the local repository with a descriptive message, preparing them for pushing to a remote repository.

7.Which HTML tag is used to create a hyperlink?

a) <link>

b) <href>

c) <a>

d) <hyperlink>

Answer: c

Explanation: The <a> tag, with the href attribute, creates a hyperlink to another webpage or resource.

8. Where is metadata contained in an HTML document?

a) <body> tag

b) <head> tag

c) <html> tag

d) <title> tag

Answer: b

Explanation: Metadata, such as <meta> tags and the document title, is placed in the <head> section.

9. What does CSS stand for?

a) Creative Style Sheets

b) Cascading Style Sheets

c) Computer Style Sheets

d) Custom Style Sheets

Answer: b

Explanation: CSS (Cascading Style Sheets) is used to style and layout HTML elements.

10. Which CSS property is used to create rounded corners for an element?

a) border-radius

b) corner-radius

c) rounded-corners

d) box-radius

Answer: a

Explanation: The border-radius property defines the radius of an element’s corners, creating a rounded effect.

11. What is jQuery primarily used for?

a) Server-side scripting

b) Simplifying client-side JavaScript tasks

c) Database management

d) Creating static web pages

Answer: b

Explanation: jQuery is a JavaScript library that simplifies DOM manipulation, event handling, and AJAX calls.

12. Which jQuery method is used to hide an element?

a) .hide()

b) .remove()

c) .fadeOut()

d) Both a and c

Answer: d

Explanation: Both .hide() and .fadeOut() can hide elements, with .fadeOut() adding a fading animation.

13. Which JavaScript function is used to change the content of an HTML element?

a) modify()

b) change()

c) update()

d) innerHTML()

Answer: d

Explanation: The innerHTML property allows JavaScript to modify the content of an HTML element.

14.What is the purpose of the HTTP POST method in forms?

a) To retrieve data from a server

b) To send data to a server for processing

c) To delete data from a server

d) To update server configuration

Answer: b

Explanation: The POST method sends form data to the server securely for processing, unlike GET, which appends data to the URL.

15. What is the purpose of sessions in web development?

a) To style web pages

b) To track user interactions across multiple requests

c) To store static content

d) To manage database connections

Answer: b

Explanation: Sessions maintain user state (e.g., login status) across multiple HTTP requests, stored on the server.

16.Which HTTP status code indicates a successful request?

a) 404

b) 200

c) 500

d) 301

Answer: b

Explanation: The 200 OK status code indicates that the server successfully processed the request.

17. What is the Document Object Model (DOM)?

a) A styling framework

b) A convention for representing and interacting with HTML/XML documents

c) A server-side scripting language

d) A database management system

Answer: b

Explanation: The DOM represents a webpage as a tree of objects, allowing JavaScript to manipulate content dynamically.

18. Which JavaScript method retrieves an element by its ID?

a) getElementByClassName()

b) getElementById()

c) querySelector()

d) Both b and c

Answer: d

Explanation: Both getElementById() and querySelector() (with an ID selector) can retrieve an element by its ID, though querySelector() is more versatile.

19. What is the primary purpose of XML?

a) To style web pages

b) To store and transport data across platforms

c) To execute server-side scripts

d) To create interactive forms

Answer: b

Explanation: XML is a markup language designed to store and transport data in a platform-independent format.

20. Are XML tags case-sensitive?

a) True

b) False

Answer: a

Explanation: Unlike HTML, XML tags are case-sensitive, meaning <Tag> and <tag> are treated as different tags.

21. What is the purpose of a DTD in XML?

a) To style XML documents

b) To define the structure and data types of an XML document

c) To execute XML scripts

d) To connect XML to a database

Answer: b

Explanation: A DTD defines the valid structure, elements, and attributes of an XML document to ensure compliance.

22. Which of the following is a valid DTD declaration syntax?

a) <!DOCTYPE root-element [element-declarations]>

b) <DOCTYPE root-element [element-declarations]>

c) <!DTD root-element [element-declarations]>

d) <DTD root-element [element-declarations]>

Answer: a

Explanation: The <!DOCTYPE> declaration is used to define a DTD, specifying the root element and structure rules.

23. What is Adobe Dreamweaver primarily used for?

a) Database management

b) Designing and developing web pages visually

c) Server-side scripting

d) Version control

Answer: b

Explanation: Dreamweaver is a web development tool that provides a visual interface for creating and editing HTML, CSS, and JavaScript-based websites.

24. Which feature of Dreamweaver allows real-time preview of web pages?

a) Code View

b) Live View

c) Design View

d) Both b and c

Answer: d

Explanation: Dreamweaver’s Live View and Design View allow developers to preview web pages in real-time during development.

25. What is PHP primarily used for in web development?

a) Styling web pages

b) Server-side scripting for dynamic content

c) Client-side interactivity

d) Database creation

Answer: b

Explanation: PHP is a server-side scripting language used to generate dynamic web content and interact with databases.

26. Which PHP function is used to start a session?

a) session_start()

b) session_begin()

c) start_session()

d) begin_session()

Answer: a

Explanation: The session_start() function initializes a session to store user data across multiple requests.

27. Which SQL command is used to retrieve data from a database?

a) INSERT

b) UPDATE

c) SELECT

d) DELETE

Answer: c

Explanation: The SELECT command retrieves data from one or more tables in a database.

28. What is MySQL?

a) A programming language

b) A relational database management system

c) A web server

d) A client-side scripting tool

Answer: b

Explanation: MySQL is an open-source relational database management system used to store and manage data.

29. Which PHP function is used to connect to a MySQL database?

a) mysqli_connect()

b) mysql_connect()

c) connect_mysql()

d) db_connect()

Answer: a

Explanation: The mysqli_connect() function establishes a connection to a MySQL database in PHP.

30. What is the correct syntax for an UPDATE query in MySQL?

a) UPDATE table_name SET column = value WHERE condition

b) SET table_name UPDATE column = value WHERE condition

c) UPDATE column SET table_name WHERE condition

d) MODIFY table_name SET column = value WHERE condition

Answer: a

Explanation: The UPDATE query modifies existing records in a table based on a specified condition.

👉 Multimedia

👉 E-Commerce

Tausif

Hi! My name is TAUSIF AHMAD I have completed B.Tech in Computer Science from Maulana Azad National Urdu University Hyderabad. I am always ready to have new experiences meet new people and learn new things. 1. I am very interested in Frontend Development. 2. I love video editing and graphics designing. 3. I enjoy challenges that enables to grow. 4. I am part time Blogger.

Post a Comment (0)
Previous Post Next Post