AWT QUESTIONS BANK
Objective Questions
1. Which of the following protocols is used to transfer web pages?
o a) FTP
o b) HTTP
o c) SMTP
o d) POP3
2. What does CSS stand for?
o a) Color Style Sheets
o b) Creative Style Sheets
o c) Cascading Style Sheets
o d) Computer Style Sheets
3. Which HTML tag is used to define a hyperlink?
o a) <link>
o b) <a>
o c) <href>
o d) <url>
4. Which CSS property is used to change the background color of an element?
o a) bgcolor
o b) background-color
o c) background
o d) color
5. Which of the following is a valid JavaScript data type?
o a) Integer
o b) Object
o c) Float
o d) All of the above
6. Which method is used to send data from a web page to a server using HTTP?
o a) GET
o b) POST
o c) PUT
o d) All of the above
7. What is the purpose of the <meta> tag in HTML?
o a) To define metadata about the HTML document
o b) To create navigation links
o c) To embed media
o d) To create tables
8. Which of the following is a feature of HTML5?
o a) <video> tag
o b) <form> tag
o c) <script> tag
o d) None of the above
9. What is the default value for the position property in CSS?
o a) relative
o b) absolute
o c) fixed
o d) static
10. What does JavaScript use to handle events?
o a) event listener
o b) event handler
o c) both a and b
o d) none of the above
11. In which programming language does PHP run?
o a) Server-side scripting language
o b) Client-side scripting language
o c) Both a and b
o d) None of the above
12. Which of the following is used to declare a variable in PHP?
o a) var
o b) let
o c) const
o d) $
13. Which method is used to handle exceptions in PHP?
o a) try-catch
o b) throw-catch
o c) catch-throw
o d) error-catch
14. Which PHP function is used to read a file?
o a) file_get_contents()
o b) read_file()
o c) get_file()
o d) fopen()
15. Which PHP keyword is used to define a class?
o a) class
o b) def
o c) function
o d) object
16. What is the default HTTP request method used by forms in HTML?
o a) POST
o b) GET
o c) PUT
o d) DELETE
17. Which method is used to get input values from a form in PHP?
o a) $_GET
o b) $_POST
o c) $_REQUEST
o d) All of the above
18. What is the purpose of the require_once function in PHP?
o a) To include a PHP file
o b) To include a file only once
o c) To display an error message
o d) To check for file existence
19. Which of the following is NOT an event in JavaScript?
o a) onload
o b) onmouseover
o c) onerror
o d) onclick()
20. Which command is used to install a package using Node.js?
o a) npm install [package-name]
o b) node install [package-name]
o c) install [package-name]
o d) npm get [package-name]
21. In PHP, which method is used to connect to a MySQL database?
o a) mysqli_connect()
o b) mysql_connect()
o c) connect_db()
o d) db_connect()
22. What is CORS in web security?
o a) Cross-Origin Resource Sharing
o b) Cross-Origin Request Security
o c) Client-Origin Resource Security
o d) Client-Origin Resource Sharing
23. Which of the following is used to include JavaScript code in an HTML page?
o a) <script>
o b) <java>
o c) <js>
o d) <code>
24. Which method is used to retrieve data from a web server in JavaScript?
o a) GET
o b) POST
o c) fetch()
o d) XMLHttpRequest
25. Which of the following JavaScript functions is used to parse a JSON string?
o a) JSON.stringify()
o b) JSON.parse()
o c) JSON.decode()
o d) JSON.toString()
26. What does a web browser's "cache" store?
a) Images only
b) Browsing history only
c) HTML, CSS, and JavaScript files
d) Cookies only
27. Which of the following is the main goal of SEO?
a) To increase website traffic
b) To increase website design quality
c) To reduce the website loading speed
d) To create high-quality content only
28. What does the <caption> tag define in an HTML table?
a) The background color of the table
b) The header row of the table
c) The title of the table
d) The content of the table
29. How do you define a CSS variable?
a) --variable-name: value;
b) var(variable-name): value;
c) variable: value;
d) css-variable: value;
30. Which keyword is used to define a class in PHP?
a) Class
b) Object
c) Define
d) Function
31. Which method is used to create a form in Laravel with the Form class?
a) Form::open()
b) Form::start()
c) Form::create()
d) Form::submit()
32. What is the main function of a web server?
a) To store websites
b) To process database queries
c) To process and deliver web pages to clients
d) To design websites
33. Which of the following is a use of the <meta> tag in HTML?
a) To link to external CSS files
b) To specify metadata about a web page (e.g., charset, description)
c) To define the title of the page
d) To add images to the page
34. Which tag was used in older versions of HTML to create a frame set for multiple frames?
a) <frameset>
b) <iframe>
c) <frame>
d) <window>
35. Which of the following is the primary benefit of using CSS?
a) Reduces the HTML code size
b) Allows for consistent styling across multiple pages
c) Increases the loading speed of the webpage
d) Handles user interactions
36. Which of the following is true about server-side programming?
a) It is executed on the client’s machine
b) It runs on the server before the webpage is sent to the client
c) It is used only for front-end web development
d) It is dependent on the user’s browser
37. Which module in Node.js is used to create a basic web server?
a) http
b) fs
c) express
d) url
Short question answer
2 Marks:
1. Explain the role of HTTP in web development.
2. What is SEO?
3. What are the main features of HTML5?
4. Describe how to create a hyperlink in HTML.
5. Explain CSS variables.
6. What is the purpose of the background-color property in CSS?
7. What is the difference between let and const in JavaScript?
8. Define function as an arguments in javascript.
9. How to create and update an array in php?Explain using examples.
10. Explain how a form is processed using PHP.
11. What is the role of the public keyword in PHP?
12. How can we include external files in PHP?
13. Why are cookies important in developing websites?
14. What is the role of routes in Laravel?
15. What is the purpose of the npm command in Node.js?
16. How to derive JSON values?
5 Marks:
1. Explain the architecture of a web browser and how it communicates with a web server.
2. Explain HTTP Request and Response.
3. Describe the basic structure of an HTML page. Provide an example.
4. What are media queries in CSS, and how are they used for responsive design?
5. Write a simple JavaScript function to validate an email address using regular expressions.
6. Write the difference between HTML and HTML5.
7. List and explain different <form> elements.
8. Discuss the importance of JSON in PHP and provide an example of working with JSON data.
9. Explain how sessions and cookies are managed in PHP.
10. Implement use of <ul>, <ol>, <li> tag to create navigation (menu) in a website.
11. What is the role of controllers in Laravel's MVC architecture?
12. What is Laravel?
13. Describe the process of handling form data in PHP.
14. Explain the difference between client-side and server-side programming.
15. Write javascript Syntax and Explain types of Javasript.
16. What are the different types of loops available in JavaScript? Explain with examples.
Long question(10 Marks)
1. Explain the HTTP request-response cycle. Discuss the different HTTP methods and their uses.
2. Describe the process of creating a simple webpage using HTML and CSS. Include at least one
example of a table, image, and form.
3. Discuss the key concepts of object-oriented programming in PHP. Provide examples of
classes, objects, inheritance, and polymorphism.
4. Explain the process of error handling in PHP using exceptions. Provide an example of a try-
catch block.
5. Create a registration for and give proper validations.
6. Write a Node.js script to create a basic HTTP server that listens on port 3000 and serves a
simple HTML page.
7. Describe the MVC (Model-View-Controller) architecture in Laravel. How does it promote
separation of concerns and improve maintainability?
8. Explain the Model View Controller design pattern in Laravel.
9. Discuss the security implications of Cross-Origin Resource Sharing (CORS) and how to enable
CORS in a web application.
10. What are JavaScript objects and how can they be manipulated using the DOM? Provide
examples of accessing and modifying HTML elements.
11. Explain the purpose of regular expressions in JavaScript and provide an example for validating
a phone number.
12. Describe the role of AJAX in modern web development and how JavaScript interacts with the
server to fetch data asynchronously.