Tribhuwan University

Institute of Science and Technology

2082

Bachelor Level / Third Year / Fifth Semester / Science

B.Sc in Computer Science and Information Technology (CSC329)

(Web Technology)

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 CSS. What is the use of CSS shadow effects? Write an HTML script with proper CSS as per the following description. Display a text content "CSIT Exam" in a div with id div1. The text should have a horizontal shadow of 3px and a vertical shadow of 2px. The shadow color should be green. Also set the horizontal and vertical shadow of the div to 10px respectively with the shadow color of div to blue.[10]

Define CSS. What is the use of CSS Shadow Effects? Write an HTML Script as Described.

Definition of CSS

CSS (Cascading Style Sheets) is a style sheet language used to describe the presentation and formatting of HTML documents, including layout, colors, fonts, and spacing.

CSS separates the content (HTML) from the design (styling), making web pages more attractive and easier to maintain.


Use of CSS Shadow Effects

CSS Shadow Effects are used to add shadow to text and elements (boxes) on a web page. They create a visual depth and make elements stand out from the background.

CSS provides two main shadow properties:

  • text-shadow — Adds shadow to text content
  • box-shadow — Adds shadow to HTML elements (like div, p, etc.)

Syntax:

  • text-shadow: h-shadow v-shadow color;
  • box-shadow: h-shadow v-shadow color;

Where:

  • h-shadow — Horizontal offset of the shadow
  • v-shadow — Vertical offset of the shadow
  • color — Color of the shadow

HTML Script with CSS Shadow Effects

<!DOCTYPE html>
<html>
<head>
    <title>CSS Shadow Effects</title>
    <style>
        #div1 {
            font-size: 30px;
            padding: 20px;
            margin: 50px;
            box-shadow: 10px 10px blue;
        }

        #div1 {
            text-shadow: 3px 2px green;
        }
    </style>
</head>
<body>
    <div id="div1">
        CSIT Exam
    </div>
</body>
</html>

Explanation

Property Value Meaning
text-shadow 3px 2px green 3px horizontal, 2px vertical, green color shadow on text
box-shadow 10px 10px blue 10px horizontal, 10px vertical, blue color shadow on div

Conclusion

CSS shadow effects enhance the visual appearance of web pages by adding depth to both text and box elements. The text-shadow property is used for text and box-shadow is used for block-level elements like div.

2.
What are jQuery selectors? Explain jQuery callback and chaining effects with appropriate jQuery scripts.[10]
3.
What is the use of XML? Create an XML file having complex type elements containing other elements and text. At least one element should contain an attribute. Similarly, there should be elements containing string, integer and date type values. Now write the equivalent XSD for the XML.[10]
Section B

Short Answers Questions

Attempt any Eight questions.
[8*5=40]
4.
Define web clients and web servers with examples. [5]
5.
Write an HTML script using audio tag. Set the autoplay, preload and loop properties to appropriate values. [5]
6.
Write an HTML script to demonstrate the onkeydown and onkeypress events. [5]
7.
Write an HTML script with proper JavaScript that will take an input from prompt box and display the input as output using the alert box. [5]
8.
Create an HTML page containing three paragraphs p1, p2 and p3 with some contents. Write internal CSS to set the position of p1 to relative, p2 to float and p3 to absolute. [5]
9.
What is the use of alert box? Write a JavaScript program to show the use of RegExp object. [5]
10.
Write a PHP program to demonstrate the concept of inheritance. [5]
11.
Write a PHP program to show insertion of multiple data into a database table. [5]
12.
Create a PHP form with form elements. Write a program to perform form validation. Use your own assumptions for the validation. [5]