0% found this document useful (0 votes)
30 views7 pages

Web Questions

The document consists of a series of questions and tasks related to web development, covering HTML, CSS, JavaScript, and JSP. It includes topics such as the purpose of various HTML tags, CSS selectors, JavaScript functions, and the architecture of JSP. Additionally, it addresses the differences between protocols like HTTP and HTTPS, and includes practical coding exercises for creating forms, validating inputs, and implementing web functionalities.

Uploaded by

rajashreer713
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views7 pages

Web Questions

The document consists of a series of questions and tasks related to web development, covering HTML, CSS, JavaScript, and JSP. It includes topics such as the purpose of various HTML tags, CSS selectors, JavaScript functions, and the architecture of JSP. Additionally, it addresses the differences between protocols like HTTP and HTTPS, and includes practical coding exercises for creating forms, validating inputs, and implementing web functionalities.

Uploaded by

rajashreer713
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Page |1

Group A
1. What is the purpose of the <meta> tag in HTML? Provide an example to
specify UTF-8 character encoding.
2. Define HTTP briefly and state its default port number.
3. Explain the purpose of the action and method attributes in the <form> tag.
4. What is HTTPS? Mention its default port number.
5. State the purpose of the alt attribute in the <img> tag. Provide an example.
6. Write HTML code to create an unordered nested list with three items in each
level.
7. Compare HTTP and TCP protocols.
8. Differentiate between a website and a home page.
9. Demonstrate inline and external CSS with syntax examples.
10. Which attribute is used to open a hyperlink in a new browser tab? Write
example code.
11. Name and briefly describe two commonly used JavaScript keyboard events.
12. Write the syntax of the HTML <img> tag and mention any two of its attributes.
13. What is the difference between class selector and ID selector in CSS? Provide
examples.
14. How are comments added in JSP?
15. Write HTML code to create a dropdown menu with options: Apple, Banana,
and Cherry.
16. Define a hyperlink. Provide an example using an anchor tag.
17. Write the syntax of a JSP scriptlet that declares and initializes an integer
variable count to 10.
18. Explain the role of CSS in web development.
19. Name and describe the protocols used to send and retrieve emails.
20. What is the CSS box model? Explain briefly.
21. Write JavaScript code to display "Welcome!" in an alert box when the page
loads.
22. What is the purpose of the <div> tag in HTML?
23. Analyze and explain the output of the following JavaScript code:

 let a = 10;
 let b = "10";
 [Link](a == b);
 [Link](a === b);

24. What is the use of the <span> tag in HTML?


Page |2

Group B
1. Write a JavaScript function checkEvenOrOdd() that prints "Even" or "Odd"
based on input.
2. Explain a static web page. Illustrate CSS child selector with an example.
3. Write a JavaScript function sumArray() that returns the sum of array
elements.
4. Define a dynamic web page. Explain the CSS class selector with example.
5. Differentiate among JSP Scriptlet, Expression, Directive, Declaration, and
Action tags with examples.
6. Write JavaScript to multiply a positive number by 2 without using * operator.
Explain ==.
7. Write JSP code to display a multiplication table of 5 using a for loop.
8. Write JavaScript to divide a number by 2 without using / operator. Explain
===.
9. Create an HTML form that collects user name and email with a submit button.
10. Explain internal vs. external CSS with suitable examples.
11. Explain the CSS box model and its components. Write CSS to style a <div>
with margin, border, padding, and width. Also, write CSS for a green hover
effect on a button.
12. Differentiate between JavaScript and JSP. Provide a valid use case of the
JavaScript modulus operator.
13. Write a JavaScript function isPalindrome() to check if a string is a
palindrome.
14. Write a JavaScript function to validate an email input in an HTML form.
Page |3

Group C
1. Explain the architecture of JSP. Describe the life cycle of a JSP page with a neat
diagram.
Also, explain the role of the JSP engine in processing a client request.
Write JSP code to store and retrieve a user's name using a session object.

2. Explain the use of <iframe> and <frame> along with their applications, with
suitable examples.
What are the security concerns associated with <iframe>?
With respect to CSS, how does the browser resolve conflicting rules?

3. Create an HTML page that displays the following:


• An ordered list of five programming languages
• An unordered list of five web development tools
Apply CSS to:
• Change the bullet style of the unordered list to square
• Change list item color and font
• Add a hover effect to list items

4. Provide the flowchart of the if - else if condition in JavaScript. Explain with


a suitable example.
Explain, with a valid example, the role of Cyclic Redundancy Check (CRC) in
ensuring data integrity in web communication.

5. Create an HTML table to display student data (Name, Roll No, and Marks in 3
subjects).
Use CSS to:
• Apply a border to the table and cells
• Set alternating row colors
• Highlight the header row with a background color

6. Provide the flowchart of the do - while condition in JavaScript. Explain with a


suitable example.
Discuss how CRC (Cyclic Redundancy Check) is used to detect errors in data
transmission over the web, using a valid example.

7. Write a JavaScript program that:


• Declares an array of 5 numbers
• Uses a loop to calculate and display the sum and average of the numbers
• Displays the result in the browser using [Link]()

8. Develop a small web page with an HTML structure for a to-do list, styled with CSS
and functional using JavaScript.
Page |4

The page should allow adding new tasks, marking tasks as completed, and deleting
tasks.
Explain how the three technologies (HTML, CSS, and JS) work together in this
project. Use comments for better code readability.
Give an example of inline CSS with a suitable code snippet.

9. Write a JavaScript function that takes a number as input and checks whether the
number is even or odd.
Display the result using alert(). Also, include HTML code to allow the user to
input the number and call the function using a button click.

10. Create a user registration form using HTML and validate the inputs using
JavaScript.
Ensure that the form checks for empty fields, a valid email format, password length
(minimum 8 characters), and matching password confirmation.
Use comments for better code readability.
Give an example of external CSS with a suitable code snippet.

PYQ
Group A
1. Answer the following questions.

i) Explain the utility of FTP protocol.


ii) Explain the difference between TCP and UDP.
iii) What is malware, and what are the common types of malware that target networks?
iv) How scripting language differs from HTML?
v) How do you create an ordered and unordered list in HTML?
vi) What is the purpose of the <title> tag in an HTML document? Give an example
of how it is used.
vii) Explain the difference between the display: none; and visibility:
hidden; properties in CSS.
viii) What are the benefits and drawbacks of using a DOM?
OR
What would be the result of 3 + 2 + "7"? Also explain how the operation
works.
ix) List the various dialog boxes in JavaScript.
x) How would you write the HTML to draw a horizontal rule 20 pixels wide?
Page |5

OR
How are cookies used for session tracking in JSP?

Group B
2.
What are the objectives of using Cascading Style Sheets? Briefly explain about linking
of external style sheets and fixing the backgrounds. (2+2+1 marks)
OR
How can you create a responsive design using CSS? How is CSS class selector
different from universal selector? (2+3 marks)

3.
Give the difference between client-side scripting and server-side scripting. Explain
how the request–response mechanism works over the Internet. (3+2 marks)
OR
Explain the role and benefits of client-side scripting in web development. Provide
examples of common tasks performed using client-side scripting. (3+2 marks)

4.
Explain different components of JSP architecture. Write a JavaScript function that
takes two numbers as parameters and returns their sum. (2+3 marks)
OR
Explain the lifecycle of a JSP page with a diagram. What do you mean by MVC
architecture? (3+2 marks)

5.
Explain the use of the this keyword in JavaScript. Provide HTML script/code to
display in web browser the following expression:
f(x) = 5x² + 4x + 3 (2+3 marks)
OR
Explain how you would write a function in JavaScript to check if a given number is
prime. Differentiate between var and let keywords in JavaScript with example.
(3+2 marks)

6.
Describe what HTTP and HTTPS protocols are. How do they differ, and why is
HTTPS important? (2+3 marks)
OR
Explain the significance of accessibility in web design. What are some best practices
for making a website accessible to users with disabilities? (3+2 marks)

7.
What is the purpose of the <!DOCTYPE> declaration in HTML? Why is JavaScript
called an object-based language?
Page |6

OR
Describe the CSS box model and explain how the properties margin, border,
padding, and content affect the layout of an element.

Group C
8.
How is the OSI layer different from the TCP/IP layer? Discuss the advantages and
disadvantages of 2-tier and 3-tier client-server architecture. Explain Denial-of-Service
(DoS) attack. (4+4+2 marks)
OR
Differentiate between a DDoS attack and a DoS attack. Differentiate between
computer worm and virus. What is the utility of the alt keyword in HTML? What is
the difference between class selectors and ID selectors in CSS? (3+2+2+3 marks)

9.
You are a web developer tasked with creating a registration form for a new social
media platform. The form requires users to input their username, email, password, and
confirm password. The form should ensure the following:

 Username: Must be between 5 to 15 characters long and contain only


alphanumeric characters.
 Email: Must be in a valid email format.
 Password: Must be at least 8 characters long, contain at least one uppercase
letter, one lowercase letter, and one digit.
 Confirm Password: Must match the password.

A. How would you validate the username field using JavaScript?


B. Write a JavaScript function to validate the email format.
C. Describe how to validate the password according to the given requirements.
D. How can you ensure that the "Confirm Password" field matches the "Password"
field?
(2.5 × 4 marks)

OR
Describe the use of the this keyword in JavaScript. How does it behave differently
in various contexts (e.g., global scope, object methods, constructor functions)? What is
the Document Object Model (DOM)? How does JavaScript interact with the DOM?
Write a code snippet to describe the working principle of a JavaScript global variable.
(3+3+2+2 marks)

10.
Suppose there is a website which allows users to convert between different units of
Page |7

measurement (e.g., kilometers to miles, Celsius to Fahrenheit).


Perform the following tasks:
A. Create an HTML webpage with input fields for value, starting unit, and a dropdown
for target units.
B. A button triggers the conversion.
C. JavaScript function handles conversion based on user input.
D. Get value and units from input fields. Only numeric values should be accepted.
E. Use if statements to perform calculations based on selected units.
(5 × 2 marks)

OR
Deploy JavaScript and HTML to perform addition, subtraction, and LCM of two
numbers. You should take user input for two numbers.
Write a JavaScript program using onclick button where the number will increase by
1 every time the button is clicked. (6+4 marks)

You might also like