Tribhuvan University

Institute of Science and Technology

2078

Bachelor Level / fifth-semester / Science

Computer Science and Information Technology( CSC318 )

Web Technology

Full Marks: 60+20+20

Pass Marks: 24+8+8

Time: 3 Hours

Candidates are required to give their answers in their own words as far as practicable.

The figures in the margin indicate full marks.

Section A

Attempt Any Two Question

1

How do you define an Array in PHP? write a PHP script to create a multidimensional array name Product that will contain pcode, pname. and price. Initialize the array with at least three instances. Also, Write an HTML script to display the initialized values of the array in an HTML Table.

2

Create an HTML signup form with fields Name, Email, Password, and Age, Validate the form using JavaScript. Write functions for validating each of the elements. All of the fields should not be empty. The Email address should be a valid email, the password should be of length at least 6 and should start with the alphabet and end with a digit. The age should be between 8 and 60.

3

How external CSS is inserted in an HTML page? Create an HTML page with two paragraph tags With id pl and p2, and one div tag with id dv1. Write an external CSS file as per the description. the margin of the paragraphs should be 100px from the top and 80px from the left. Both of paragraphs should have the display set to block. The dv1 should have padding left and right set to 30px and 25px respectively, its background color should be blue and the font color should be red with the font type Verdana. Set the display of dv1 to none.

Section B

Attempt Any Eight Questions

4

What are the services provided under web2.0?

5

Create an HTML page with its body containing a div. The div should contain an image within
it. Create a link on the image to redirect to the url http://www.tuiost.edu.np. Set the title of the
page to “iost”. Add Meta tag on the page.

6

How jQuery id selector can be used to select specific element? Write an example with jQuery
that will hide a paragraph on clicking a button.

7

Create a HTML page containing ordered and unordered lists. Set the value of ordered list type
to “A”. The list should start at “D”.

8

Discuss about different JSON data types.

9

What is DTD? Create a XML file and write its equivalent DTD.

10

How can you define function in PHP? Create a function that will take two integers as argument and will return product of them.

11

Describe CSS Box model with example.