Web PRGM PYQ
Web PRGM PYQ
Web PRGM PYQ
1 Why do you call MIME as an extension feature? Justify with suitable statements. (3)
2 Discuss URI’s and URL. (3)
3 Compare Absolute Positioning and Relative positioning. (3)
4 What is a call back function in JavaScript? State how it is different from normal (3)
functions.
5 Write a PHP program to check whether the given number is prime or not. (3)
6 List out the sorting functions for Arrays in PHP. Illustrate with suitable (3)
examples.
7 Discuss the various steps for establishing PHP-My SQL connection with a My (3)
SQL database.
8 Illustrate with a sample PHP script, how CREATE operations on My SQL table (3)
are implemented in PHP.
9 Describe the schema of a document implemented in JSON with suitable examples. (3)
10 Explain the role of Resource controllers in Laravel. (3)
PART B
Answer any one full question from each module, each carries 14 marks.
Module I
11 a) Write the equivalent HTML code to implement the following in a web page: (4)
1) An image titled “flower.jpg” with proper attribute to set height, width and
message text.
2) Unordered list with values tea, coffee and milk
b) Explain following html tags with proper example. (10)
1.<textarea> 2. < span> 3.< tr> 4.< form> 5.<a>
OR
Page 1of 4
1000CST463122202
Company Model
Dodge Challanger
Maruti Swift
Jeep Wrangler
Fusion
Ford Fiesta
Escape
b) Write down the general format of an HTTP request and an HTTP response. What (6)
is the purpose of the following HTTP headers? Also, identify whether they are
included with an HTTP header/response or both.
i. host ii. last-modified
Module II
13 a) Write CSS code for the following: (6)
i) set the background color for the hover and active link states to
"yellow".
ii) Set the list style for ordered lists to "lower case alphabet".
iii) Set "Boat.gif" as the background image of the page.
iv) Set dotted border for the document.
b) What are class selectors in CSS? Suppose that it is required to display the text (6)
content of p tags in two different styles depending on the context.
Page 2of 4
1000CST463122202
Style 1 – text should be displayed in blue colour, right aligned, underlined, with
font style of italics and spacing between the words of text set to 2 cm.
Style 2 – text should be displayed with a background colour of yellow, blue colour
border, and with a padding of 1.5 cm
Write the equivalent CSS style rules.
Module III
15 a) Explain any six string handling functions used in PHP with example. (6)
b) What is the purpose of the implicit arrays $_POST and $_GET in PHP? Consider (8)
that a web page displays a form containing two text boxes (named num1 and
num2), where the user enters numeric data. Write a PHP script which collects this
form data, finds the sum, difference and the product of the two numbers and then
displays the same with suitable messages. Assume that the script is to be
embedded in the web page specified by the action attribute of the form and that
the method used when the form is submitted is GET.
OR
16 a) Illustrate with a sample PHP script, how functions are implemented in PHP. (6)
b) Why is PHP considered to be dynamically typed? Distinguish between implode (8)
and explode function in PHP with suitable examples.
Module IV
17 a) What is the significance of cookies in web? How can a cookie be created (6)
and destroyed in PHP?
b) Write equivalent PHP statements corresponding to the following (8)
i)Declare an associative array named “marks” to store the key-value pairs
(“Ram”, 40),(“Alice”,20),(“Raj”,45),(“Mary”,35).
ii)Modify the value associated with the key “Ram” to 50.
iii)Sort the array and print the sorted key value pairs.
iv)The entry identified by the key “Raj”
OR
Page 3of 4
1000CST463122202
18 a) Design an HTML form for entering a number by the user. Write a PHP code to (6)
display a message indicating, whether the number is positive or negative, when
clicking on the submit button.
b) Write a PHP form handling program to perform the user registration of any (8)
website with a minimum of 5 different fields and insert the data into a My SQL
table after establishing necessary connections with the Database.
Module V
19 a) With a neat diagram, explain about Laravel MVC Framework (6)
b) Discuss in detail about Laravel’s Routing mechanisms (8)
OR
20 a) List the data types used in JSON? Explain the use of parse() and stringify() (8)
functions in JSON with examples.
b) What is Route Model Binding in Laravel? Which types of route model binding (6)
are supported in Laravel?
****
Page 4of 4
1000CST463122202
PART A
Answer all questions, each carries 3 marks. Marks
Page 1of 4
1000CST463122202
OR
12 a) HTML code for table design – 8 marks ( <table>, <th>,<tr>,<td>,rowspan and (8)
colspan)
b) General format of an HTTP request and an HTTP response – 4 marks (6)
Purpose of the following HTTP headers i. host ii. last-modified – 2 marks
Module II
13 a) Write CSS code for the following: (6)
i) set the background color for the hover and active link states to
"yellow". – 2 marks
ii) Set the list style for ordered lists to "lower case alphabet". – 2 marks
iii) Set "Boat.gif" as the background image of the page. – 1 mark
iv) Set dotted border for the document. – 1 mark
b) Various types of control statements in JavaScript – (if, if else, elseif, switch, while, (8)
for, do while) – Any 4 – 2 marks each with proper examples.
OR
14 a) Event handlers in JavaScript – 2 marks (8)
HTML Code – 2 marks
JavaScript Script tag code – 2 marks
Button Click Code – 2 marks
b) Class Selectors definition – 2 marks (6)
Style 1 – 2 marks
Style 2 – 2 marks
Module III
15 a) Any six string handling functions in PHP with example – each carries 1 mark (6)
b) Purpose of $_POST and $_GET – 2 marks (8)
HTML code – 2 marks
PHP Script – 2 marks
Page 2of 4
1000CST463122202
OR
16 a) Syntax for function definition and function call in PHP – 3 marks (6)
Sample PHP code – 3 marks
b) Justification – 2 marks (8)
Implode function- explanation with example – 3 marks
Explode function – explanation with example – 3 marks
Module IV
17 a) Significance of cookies in PHP – 2 marks (6)
Create cookies using setcookie ( ) – 2 marks
Delete cookies using setcookie ( ) – 2 marks
b) i)Declare an associative array named “marks” to store the key-value pairs (8)
(“Ram”, 40),(“Alice”,20),(“Raj”,45),(“Mary”,35). – 2 marks
ii)Modify the value associated with the key “Ram” to 50. – 2 marks
iii)Sort the array and print the sorted key value pairs. – 2 marks
iv)The entry identified by the key “Raj” – 2 marks
OR
18 a) HTML form design – 2 marks (6)
PHP code – 2 marks
Button click – 2 marks
b) HTML code for user registration – 4 marks (<form action=connect.php, (8)
method=post)
PHP code - $_POST , MYSQL database connection and insert data - 4marks
Module V
19 a) Laravel MVC Framework – explanation – 4 marks (6)
Diagram – 2 marks
b) Laravel Routing Mechanisms – Explanation about Route definitions and Route (8)
groups.
Page 3of 4
1000CST463122202
OR
20 a) JSON data types – 4 marks (8)
parse ( ) - Explanation with example – 2 marks
stringify ( ) – Explanation with example – 2 marks
Page 4of 4
B 1000CST463122204 Pages: 3
PART A
Answer all questions, each carries 3 marks. Marks
1 Define MIME? List any two features offered by MIME to e-mail services? (3)
2 What is the purpose of the attributes autoplay, src, controls when used with (3)
audio tag?
3 Name 3 components of box model? (3)
4 List any 3 methods associated with javascript String object with their input (3)
parameter and return type ?
5 List six primitive data types used in PHP? (3)
6 Give 3 string functions used in PHP associated with removal of whitespaces? (3)
How will they differ each other?
7 What is a cookie? Write the appropriate syntax for creating a cookie in PHP? (3)
8 Discuss the various steps for establishing PHP-MySQL connection with a MySQL (3)
database?
9 List any 3 attributes that is required to define JSON schema? (3)
10 Differentiate between implicit and custom route model binding? (3)
PART B
Answer any one full question from each module, each carries 14 marks.
Module I
11 a) How will you navigate between sections in the same web page? Illustrate with (4)
appropriate example?
b) Create a HTML form for registering to a jobsite which includes fields to enter (10)
your name,address,e-mail,contact number, a date picker to include your date of
birth,radio buttons to select you sex,check boxes to show your area of interest, a
selection list to input your experience with a submit and reset button. All fields
must be labelled appropriately?
OR
Page 1of 3
1000CST463122204
b) Give the syntax to create hyperlinks in HTML? List any 3 target attributes and (6)
their purpose associated with hyperlinks? Also how will you identify an active
link, visited link and unvisited link?
Module II
13 a) Write CSS and the corresponding HTML code for the following: (8)
i. Set the background color for the hover and active link states to "green"
ii. Set the list style for unordered lists to "square".
iii. Set "Flower.png" as the background image of the page .
iv. Set dashed border for left and right and double border for top & bottom of a table
with 2 rows.
b) Develop embedded JavaScript that displays the cube of the number with font - (6)
weight 400 and font-color green, entered through a prompt box?
OR
14 a) Using Javascript function validate an HTML form containing textboxes for (7)
entering username, password and a submit button. Validation should check the
following criteria, if it’s not satisfied an alert must be given.
• Username must not be blank
• Password must not be less than 6 characters
b) What is the significance of positioning? Differentiate between absolute (7)
positioning and relative positioning with necessary example?
Module III
15 a) Which are the 3 types of arrays in PHP? Illustrate with necessary example? (6)
b) Develop a PHP program to print the factorial of a number using a function that (8)
accepts number as input and returns the factorial?
Page 2of 3
1000CST463122204
OR
16 a) Why is regular expressions used in PHP? What are the 3 components of a (6)
regular expression? Name any two Pearl compatible functions used with regular
expressions?
b) (8)
I. Declare an associative array named “items” to store the key-value pairs
(“Bread”, 30), (“Butter”, 30), (“Jam”, 35), (“Cheese”, 32).
III. Sort the array according to values maintaining the key-value relationships
and print the sorted key-value pairs.
Module IV
17 a) With necessary example give two methods to identify a user across multiple pages in (8)
PHP?
b) Assume an HTML page exists with fields name, age named as t1 and t2.Develop (6)
a PHP code to retrieve the values in textfields in your page. Also print the
corresponding name from t1 is minor if age is less than 18 else print
corresponding name from t1 is major(eg:-“Anu is minor”)?
OR
18 a) Develop a PHP program that retrieves data from a student registration form with (10)
minimum 5 different fields and insert the data into a MYSQL table after
establishing necessary connection with the database?
b) How dynamic content is handled in PHP? (4)
Module V
19 a) Explain any 5 features of Laravel? (10)
b) What is the purpose of using stringify() and parse() in JSON? (4)
OR
20 a) Explain how Laravel performs route handling using routes calling controller (10)
methods?
b) List the datatypes used in JSON? (4)
****
Page 3of 3
B r000csT46312220s
PART A
Answer all questions, each carries 3 morks. Marks
I Write the structure of HTML with example. (3)
2 What is a URL? Explain the different parts of URL with example. (3)
5 Explain id selector and class selector in CSS with suitable examples (3)
4 Explain array creation in JavaScript with examples. (3)
) How to use functions in a PHP program with an example. (3)
6 Distinguish between implode and explode function in PHP with suitable (3)
examples.
7 What is cookie? How does PHP support the concept of cookies. (3)
8 Write a simple connection script to make a connection to MYSQL with PHP. (3)
9 Briefly explain JSON syntax with example. (3)
l0 Describe the schema of a document implemented in JSON with suitable (3)
examples.
I
PART B
Answer ony onefull questionfrom each module, eoch carries 14 marks.
Module I
ll a) Write the equivalent HTML code to implement the following in a web page: (6)
i. An image titled "flowersjpg" with a heighrof 150 pixels and width of 250 I
Page lof4
1000csT463122205
b) Write the HTML code for obtaining the following table. (8)
Flower Show
FlowerName Colour
Red Rose Red
White Rose
White
Jasmine
Sunflower Yellow
OR
12 a) Explain list tags with example. (6)
b) Write the HTML code for obtaining the following registration form, where the (8)
coume field contains the options BCA, BBA, B. Tech, MBA, MCA, M. Tech.
Firstname f-
Miclclleuaur.rm
Lastname: f___---*_------- l
Course : fEourse ., i
Geuder:
C) Male
,C Female
- O other
Phone,|*91--i[.---__j
Adclress
..-
blllarl: i __"i
. f---_-
rassworc: i i
Re-typc pass.r*-ord:
Tsu#iif
Module II
l3 a) Explain different levels of css Style sheets with suitable example. (6)
b) Write JavaScript program to find factorial of a number, use prompt dialog box (8)
to get the input from user. -
OR
14 a) Write CSS and the corresponding HTML code for the following:
Page2of 4
tv
1000csT463122205
i. Set the background color for the hover and active link states to "yellow".
ii. Set the list style for ordered lists to "lower case alphabet".
iii. Set "boatjpg" as the background image of the page and set 3Yo margin
for the page.
iv. Set dotted border for the document.
Module III
15 a) Write a PHP program to compute the sum of the positive integers up to 100 (6)
display the sum, difference, product and quotient of these two numbers, when
clicking the 'CALCULATE' button.
b) What are the uses of cookies in web pages? Describe syntax for setting cookies (6)
, I
in PHP. How can you access and delete thrctookie using setcookie0 function?
OR
18 a) What is a PHP session, explain how to start, modifu and destroy session (7)
variables with example.
b) Explain CREATE, INSERT and SELECT operations on MySQL table with (7)
example.
Page 3of4
rr0csT46:ltzxto'
Modutc V
19 a) Exptain dF oolsrol qructurcs in Bladc Tem$ating, (E)
b) Exptain thc'mctMs of Lararrcl's rcsourlce eoartrollers. (5)
OR
20 a) Whd is Roub Mod€t Bin ing in Laravcl? Which typcs of r* mdcl bird@
arc supported h Laravel?
I
b) List the dda t'"es used in JSON? Explrin Se use of pars{ rd *ringifyQ
functions in JSON with exanples
Page 4of4
B 1000CST463122201 Pages: 2
Page 1of 2
1000CST463122201
columns for entering the mark list of 4 students. Assume suitable headings for
each column.
Module II
13 a) Explain CSS and its types. How can CSS be used to display a XML document? (8)
Illustrate with an example.
b) Explain the concept of Class selectors in CSS with examples. (6)
OR
14 a) Describe Java Script. Discuss various types of control statements in JavaScript. (8)
b) Explain the concept of Document Object Model with example. (6)
Module III
15 a) Illustrate with a sample PHP script, how functions are implemented in PHP. (8)
b) Design a HTML form to input a string and to display whether it is palindrome or (6)
not on form submission using PHP script.
OR
16 a) Explain different ways to create an array in PHP. Explain with example. (8)
b) Write a PHP script to search for a specific string pattern in a text. (6)
Module IV
17 a) Explain form processing in PHP. Design an HTML form for entering a number (8)
by the user. Write a PHP code to display a message indicating, whether the number
is prime or not, when clicking on the submit button.
b) Explain the concepts of cookies in PHP. (6)
OR
18 a) Write a PHP form handling program to perform the student registration on a (8)
college website with a minimum of 6 different fields and insert the data into a
MySQL table after establishing necessary database connectivity.
b) Explain the concepts of sessions in PHP. (6)
Module V
19 a) Differentiate between JSON and XML with suitable examples. (8)
b) Explain the structure of JSON Schema with suitable examples (6)
OR
20 a) Explain Route Model Binding in Laravel and describe types of route model (8)
binding supported in Laravel.
b) With a neat diagram, explain about Laravel MVC Framework. (6)
****
Page 2of 2
1000CST463122201
PART A
Answer all questions, each carries 3 marks. Marks
2 Block tags and inline tags Difference:2 marks examples:1 marks (3)
3 CSS style rules (3)
a. to display the content of hyperlinks with red background colour and in
italics.:1 marks
b. display the contents of unordered lists in Times New Roman font: 1 marks
c. to display "Ocean.gif" as the background image of the page:1 marks
4 Absolute Positioning and Relative Positioning Difference:3 marks (3)
5 PHP program to check whether the given number is Armstrong or not: 3 (3)
marks
6 Explode () and implode () functions in PHP :2 marksexamples :1 marks (3)
7 Require and include syntax: 3 marks (3)
8 PHP statements to insert data into MySQL table: 3marks (3)
9 Role of Resource controllers in Laravel:3 marks (3)
10 Data types used in JSON: 3marks (3)
PART B
Answer one full question from each module, each carries 14 marks.
Module I
11 a) Structure of an HTML document: 3marks Explain following html tags with (8)
proper example. (1 mark each)
1.<input> 1 mark
2. < img> 1 mark
3.< table> 1 mark
Page 1of 3
1000CST463122201
Page 2of 3
1000CST463122201
17 a) Explain form processing in PHP. Design an HTML form for entering a (8)
number by the user. Write a PHP code to display a message indicating,
whether the number is prime or not, when clicking on the submit button.
Program and design:8 marks
b) Concepts of cookies in PHP:6 marks (6)
OR
18 a) Write a PHP form handling program to perform the student registration on (8)
a college website with a minimum of 6 different fields and insert the data into
a MySQL table after establishing necessary database connectivity.
Program with design:8 marks
b) Concepts of sessions in PHP.:6 marks (6)
Module V
19 a) JSON and XML with suitable examples:Difference with examples:8 marks (8)
b) Structure of JSON Schema :4 marks Example:2 marks (6)
OR
20 a) Route Model Binding in Laravel :4 marks Types of route model binding (8)
supported in Laravel:4 marks
b) Laravel MVC Framework:3 marks Diagram:3 marks (6)
****
Page 3of 3