Tribhuwan University

Institute of Science and Technology

2080

Bachelor Level / Second Year / Fourth Semester / Science

Bachelors in Information Technology (BIT251)

(Web Technology I)

Full Marks: 60

Pass Marks: 24

Time: 3 Hours

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

The figures in the margin indicate full marks.

Section A

Long Answers Questions

Attempt any TWO questions.
[2*10=20]
1.
Define HTML head and body tags. Write HTML script to display following output. The title of the page should be 'BIT Web Tech'.
question image
[10]
2.
How inline, internal, and external CSS are used in an HTML document. Illustrate with examples. Your CSS should include at least one class selector and id selector.[10]
3.
Create an HTML form for signup. The form should contain form elements for username, password, email, country, gender, and hobbies. The username should be at least of 8 length, password should be of 6 length having at least one digit. The username and password should be present. The email should be valid. The country field in dropdown should be selected. The gender and hobbies in radio and checkboxes should also be checked respectively. Now write JavaScript function to validate the form as per mentioned.[10]
Section B

Short Answers Questions

Attempt any Eight questions.
[8*5=40]
4.
Describe HTTP Request and Response. [5]
5.
What is XMLHttpRequest Object? Write AJAX script to demonstrate use of XMLHttpRequest Object. [5]
6.
What are HTML form events? Write HTML script that prints some texts during onchange and onfocus event of some form elements. [5]
7.
Write internal CSS to illustrate the static, relative, and fixed position property of an HTML element. [5]
8.
Write HTML script to markup photo in an HTML document using figure tag. The source path of the photo is D:\BIT\CAMPUS.JPEG. Set the alternate text to 'BIT'. The caption of the figure should be 'This is the BIT Campus'. [5]
9.
What is Xquery? Given following XML, write an XQuery to retrieve the title of movies having budget greater than 500. Write result of the XQuery expression.
question image
[5]
10.
What is the use of XML? Why is it called extensible, justify with example. [5]
11.
How DTD is different from XSD? [5]
12.
How exception handling is done in JavaScript? Write a JavaScript program that will handle an exception when an input number is divided by zero. [5]