BIT 4th Semester
Web Technology I Question Paper 2080

Views: ...

BIT 251-2080 ✡
Tribhuvan University
Institute of Science and Technology
2080
Bachelor Level/Second Year/Fourth Semester/Science
Bachelors in Information Technology (BIT 251)
(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 Answer Questions
Attempt any Two question.
[2x10=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".

This is Div-1 with id=dv1
Fruits
1. Banana
2. Apple
Name
Ram
Address
• Nepal
• India
Watermelon23
Gita
Sita
Hello
Table 1: This table is link to www.facebook.com

2.

How inline, internal and external CSS are used in HTML document. Illustrate with examples.Your CSS should include at least one class selector and id selector.

3.

Create a 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.

Section B

Attempt any Eight questions

[8x5=40]
4.

DescribeHTTP Request and Response.

5.

What is XMLHttpRequest Object? Write AJAX script to demonstrate use of XMLHttpRequest Object.

6.

What are HTML form events? Write HTML script that prints some texts during onchange and onfocus event of some form elements.

7.

Write internal CSS to illustrate the static, relative and fixed position property of an HTML element.

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 "CSIT". The caption of the figure should be "This is the CSIT Campus".

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.
<MovieStore>
  <Movie>
    <Title>Jaari</Title>
    <Actor>Dayahang</Actor>
    <Year>2022</Year>
    <Budget>200</Budget>
  </Movie>

  <Movie>
    <Title>Aadipurus</Title>
    <Actor>Prabhas</Actor>
    <Year>2023</Year>
    <Budget>1000</Budget>
  </Movie>

</MovieStore>

10.

What is the use of XML? Why it is called extensible, justify with example.

11.

How DTD is different from XSD?

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.