Question Bank
Course: Internet and Web Programming Course Code: CSE-4001
Unit-1
1. Discuss the evolution of Internet and WWW.
2. Differentiate WWW and Internet.
3. What is web protocol? List different types of web protocols.
4. Describe the difference between a web browser and a web server with architecture
diagrams.
5. Explain Web system architecture with diagram.
6. What is URL? And its structure. Describe
7. Describe the working of Domain Name System(DNS) with diagram.
8. Discuss and differentiate client-side vs. server-side scripting.
9. Explain N tier web system architecture.
Unit-2
10. Compare HTML and CSS with advantages and
disadvantages.
11. Write HTML code for anemployee registration formshown
in the image.
12. Design an HTML table to show a monthly expense tracker,
with rows for categories (food, rent, travel, etc.) and
columns for each week of the month.
13. Create a table in HTML that uses:
a. rowspan to merge two rows.
b. colspan to merge two columns.
14. Write HTML code to create a webpage with two sections:
one showing an image gallery and the other playing a
video.
15. Create a personal website with Formatting, Colors,
Images, Lists, Links and Tables HTML tags.
16. Explain how the <canvas> element works. What kind of applications use it?
17. Create a multimedia web page showcasing a cultural event using images, videos, and
formatted content with appropriate layout.
18. List and explain different types of CSS selectors with examples.
19. Classify the three ways to create CSS with an example and output.
20. Define the CSS Box Model. What are its four components?Show how total width and height
of an element is calculated with a sample CSS rule.
21. Differentiate between content-box and border-box models in CSS. Create a styled HTML
layout to illustrate the difference.
22. Scenario: A product page displays items in a 3-column grid. Each item has a title, image, and
price, enclosed in a box with shadows.
Question: Write external CSS rules for the class .product-card to:
c. Set width to 30%
d. Add margin between items
e. Add box-shadow
f. Align text to the center
Unit-3
23. Write a JavaScript function calculateSum(arr) that takes an array of numbers and
returns the sum of all elements.
24. What is the Document Object Model (DOM) in JavaScript? How does it help in
building dynamic web pages?
25. Write JavaScript code to change the text of a paragraph with the id description to
"Welcome to JavaScript!" when a button is clicked.
26. Write a regular expression to validate an email address [Link] that regular
expression, write a JavaScript function validateEmail(email) that returns true if the
email is valid, and false otherwise.
27. Differentiate BOM and DOM.
28. Discuss different Built in objects in JavaScript with examples.
29. Differentiate between getElementById, getElementsByClassName, and querySelector
30. Write a JavaScript program that performs the following DOM operations on a web
page:
a. Changes the text of an element with the ID title to "JavaScript DOM
Example".
b. Adds a new <li> element with the text "New Item" to an unordered list with
the ID itemList.
c. Changes the background color of all elements with the class highlight to
yellow.
31. Create a simple HTML form with an input field (ID: username) and a button (ID:
checkButton). Write a JavaScript function that:
d. Gets the value entered in the username input field.
e. Displays an alert saying "Welcome, <username>!" when the button is clicked.
f. If the field is empty, display an alert saying "Please enter your username."
32. Given a paragraph element with ID infoText, and a button with ID toggleBtn, write
JavaScript code to:
g. Toggle the visibility of the paragraph each time the button is clicked.
h. Change the button text to "Hide" when the paragraph is visible and to "Show"
when it is hidden.
33. Design a simple webpage that includes:
i. An input field where the user can enter a time (in seconds).
j. A "Start Timer" button.
k. A section to display the countdown timer.
l. When the timer reaches zero, display the message: "Time's up!"
34. Design a web page with a user information form that includes the following input
fields:
Full Name (text)
Email Address (email)
Age (number)
The page must include:
m. A "Preview" button to display the entered information for confirmation
before submission.
n. A section on the page that displays the user's input as a preview (not in an
alert).
o. A "Submit" button that displays a message like: "Form submitted
successfully!" when clicked after preview.
p. A "Reset" button that clears all the form fields and the preview section.
35. What is an event in JavaScript? Explain with two examples of commonly used events.
36. Define JSON. Explain its key syntax [Link] the data types supported by JSON with
suitable examples.
37. Illustrate how JSON is parsed and stringified in JavaScript ([Link]() vs
[Link]()) with examples. Write a program where employee details are stored
in an object, converted into a JSON string using stringify, and then parsed back using
parse. Explain each step clearly.
38. Define the term selector in jQuery and give [Link] a jQuery script to
hide and show a div with a fade effect.
39. Define a jQuery [Link] at least five popular jQuery plugins and their use cases.
40. Create a jQuery plugin that highlights all links on a page and counts them
dynamically.
Unit-4
41. Describe the structure of a PL/SQL block with a neat syntax &diagram.
42. List and explain the different types of PL/SQL variables with examples.
43. Write a PL/SQL program for the following
a. calculate the factorial of a number using a loop.
b. check whether a given year is a leap year or not.
c. input marks of a student in 5 subjects and display the grade as per average marks.
d. count the number of vowels in a string.
e. display employee details (name, salary) from the EMP table where salary > 3000.
44. Define XML Schema and explain its advantages over DTD with examples.
45. Compare and contrast DTD vs XML Schema in terms of validation, data types, and usage.
46. Write a short note on XSL/XSLT and its role in transforming XML documents.
47. Analyze the role of XSLT in separating content and presentation with a working
transformation example.
48. Explain the XML DOM hierarchy with a neat diagram and suitable example.
49. Apply XQuery to fetch all book titles from an XML file containing a list of books.
50. Explain the importance of Namespaces in XML with an example.
51. Explain the AJAX request–response cycle with a simple diagram.
52. Develop an AJAX-based webpage that dynamically fetches and displays weather data from an
XML feed.
53. Show how AJAX using jQuery simplifies asynchronous calls compared to plain JavaScript.
Unit-5
54. Explain how arrays are created and manipulated in server-side scripting .
55. Write a server-side script to find the largest and smallest numbers in an array.
56. Write a program to display a student’s marks using an associative array.
57. What is the difference between built-in functions and user-defined functions? Give
examples. Write a function that accepts two numbers and returns their greatest common
divisor (GCD).
58. How does server-side scripts handle form data sent using GET/POST method?
59. Explain the file handling operations for server-side scripting.
60. Write a server-side script to create a file [Link] and write 5 student names into [Link]
a file line by line and count the number of words.
61. Write a program to create a file, write some content into it, read the same content, and then
append additional text.
62. Write the steps to connect to a MySQL database using mysqli_connect() and fetch and
display all records from the table products(id, name, price).
63. Write a server-side script to connect to a MySQL database and fetch all records from a table
“students” and display it on client side
64. Write a script to send an email with subject “Test Mail” and body “Hello World!”.
65. How can you parse XML data on server side? explain libraries used for XML parsing with
example.
66. Write a script to parse the following XML and display the <title> value:
<book>
<title>scripting Basics</title>
<author>Sam</author>
</book>
67. Write an AJAX call (client-side) and (server-side) to return the current server time without
refreshing the page.
68. What is the difference between Fetch API and AJAX (XMLHttpRequest) when used with
backend?
**************