You are on page 1of 7

Internet Technology & Web Designing BT0055

SET-1
Books ID: B0020

1. How will you add styles to a document?

Ans: There are three way to include style information in an HTML document. The first is
to use an outside style sheet, either by importing it or linking to it. The second is to
embed a document-wide style in the <HEAD> element of the document. The third is to
provide an inline style, right where the style needs to be applied.

Linking to a Style Sheet

An external style sheet is simply a plain text file containing the style specifications for
HTML tags or classes. The common extension indicating that it is a style sheet file is
.css for CSS1 style sheets. By this method, we can use one style sheet for multiple
pages. We can create .css file by follow the following steps.

Step1: Create a new document

Step2: Create a style sheet as follows:

BODY { font:10pt;
font-family:Serif;
background: white}
H1 { font:24pt;
font-family: Sans-Serif;
color:black}
H2 { font:16pt;
Font-family:Sans-Serif;
Color:black}
P { text-indent:0.5in;
margin-left:50px;
margn-right:50px}
A:link: { color:blue;
text-decoration:none;
A:visited: { color:blue;
Text-decoration:none}
A:active: { color:red;
Text-decoration:none}
Step3: Save it as style.css
Step4: Now, to use this style sheet, all we have to write
<LINK rel=”stylesheet” href=”style.css” Media=”screen” TYPE=”text/css”>
In the HEAD part of our document.
Embedding and Importing Style sheet
Cybotech Campus Page 1
Internet Technology & Web Designing BT0055

In this we write the style rules directly within the HTML document.Document-wide style
is a very easy way to begin using style sheets. It involves the use of <STYLE> element
found within the <HEAD> element of an HTML documents. Enclose the style rules
within the <STYLE> and </STYLE> tag pair and place these within the head section of
the HTML documents. Example are as folows
<HTML>
<HEAD>
<TITLE>Document-wide style sheets<?TITLE>
<STYLE TYPE=”text/css” MEDIA=”screen”>
<!--
BODY {background: white;
margin-left: 1 in;
margin-right: 1.5 in}
H1 { font-size: 24pt;
font-family: san-serif;
color: red;
text-align: center}
P { font-size: 12 pt;
font-family: Serif;
text-indent: 0.5 in;
color: black}
-->
</STYLE>
<BODY>
… content affected by style sheet….
</BODY>
</HTML>
Using Inline Style
Other than using style sheet for the whole document, it is possible to add style
information right down to single element. The simplest way to add style information, but
not necessarily the best, is to add style rules to particular HTML element. For example:
<H1 STYLE=”font-size: 48pt; font-family: Arial; color:green”>CSS1Test</H1>
Using this style, it is easy to apply style to a certain section ot division of a document.
2. What is DTD? Explain.

Ans: This is the oldest form of format for XML is DTD. The full form for DTD is
document type definition and it is inherited from SGML. It can be said that
inclusion of DTD has increased the popularity of XML but DTD has its share of
limitations.The document type definition is an XML description of the content
model of a type of documents. Then document type declaration is a statement in
an XML file that idenifies the DTD that belong to the document. A Document Type

Cybotech Campus Page 2


Internet Technology & Web Designing BT0055

Declaration associates a DTD with an XML document. Document Type Declarations


appear in the syntactic fragment doctypedecl near the start of an XML document The
declaration establishes that the document is an instance of the type defined by the
referenced DTD.

The syntax of a document type declaration is:

<!DOCTYPE DTD.name [internal.subnet ]>

DTDs make two sorts of declaration:

1. an internal subset
2. an external subset

The declarations in the internal subset form part of the Document Type Declaration in
the document itself. The declarations in the external subset are located in a separate
text file. The external subset may be referenced via a public identifier and/or a system
identifier. Programs for reading documents may not be required to read the external
subset.

3. What is pattern Matching? Explain.

Ans:Pattern matching is the searching of a sequence of characters within a character


string. When doing pattern matching if a pattern is found then a match is said to have
occurred.

A pattern is a sequences of characters to be searched for in a character string. In Perl


pattern are normally enclosed in slash character: /def/ this represent the pattern
def.

The pattern matching operators

Perl defines two operators for pattern matching. They are

 The =~ operator tests whether a pattern matched.


 The !~ operator is similar to =~, except that it checks whether a pattern is not
matched.

Pattern matching functions

Pearl has three main functions which are used for pattern matching (although pattern
matching can be used in other functions such as split () function). They are the m//, s//,
and tr///.

Cybotech Campus Page 3


Internet Technology & Web Designing BT0055

Books ID: B0022

4. Write a Java Script procedure to input 5 numbers and display their sum.

Ans:

5. Describe various VBScript data types and subtypes.

Ans:VBScript has only one data type called a variant. A variant is a special kind of data
type that can conatin different kinds of information, depending on how it is used. Since
variant is the only data type in VBScript, it is also the data type returned by all functions
in VBScript.

A variant can also have a varietyof numeric data ranging from Boolean value to huge
floating-point numbers. These diffeent categories of information that can be contined in
a variant are called subtypes.

Subtypes Description

Empty Variant is not initialized. Value is 0 for numeric variables or a zero-length


string(“”) for string variables.
Null Variant intentionally contains no valid data.
Boolean Contain either True or False
Byte Contain integer in the range 0 to 255.
Integer Contain integer in the range -32,768 to 32,767.
Currency -922,337,203,687,477.5808 to 922,337,203,685,477.5807.
Long Contain integer in the range -2,147,483,648 to 2,147,483,647.
Single Contains a single-percision , floating-point number
Double Contain a double percision, floating number
Date(Time) Contains a number that represents a data between January 1, 100 to
December 31, 9999.
String Contains avariable-length string that can be up to approximately 2 billion
chatacters in length.
Object Contains an object.
Error Conatins an eror number.

6. What are ActiveX controls? Explain.

Ans: Active X defines new specification for OLE controls, which allows them to be much
smaller and more efficient in the Internet environment. Active X provides a means for
interaction on the world wide web. Similar to OLE, Active X is aso based on COM.
Active X allows the controls to be embedded in web pages and also allows them to be
used interactively. Active X is designed for speed and size. Active X focuses on

Cybotech Campus Page 4


Internet Technology & Web Designing BT0055

integrating various objects written in a variety of programming languages, such as c, c+


+, Java, and Visual Basic. Active X is currently supported by the windows operating
system. There are more than one thousand controls available. An Active X control can
be embdded to an HTML document by using <OBJECT> tag. The <OBJECT> tag has
several attributes to describe the properties of the object. Two most important attributes
that are required when including the Active X controls in web pages are CLASSID and
ID. The CLASSID idetifies the type of control and code needed for its execution and ID
attribute gives the name to the object which is used to reference the control within the
document. <OBJECT> tags requires a corresponding </OBJECT> tag.

The attributes of <OBJECT> tag

 ID: It identifies the object within a script.


 CLASSID: A URL that identifies an implementation for the object.
 DECLARE: Idicates that the object is to be declared but not instantiated.
 CODEBASE: The Base URL from which the object is referenced.
 DATA: A URL pointing to the object data. In the absance of CLASSID, Data
determines a default value for the CLASSID attribute.
 CODETYPE: It specifies the internet media type of code referenced by CLASSID
attribute before it is actually retrieved.
 STANDBY: It specifies a short text string the browser can show while loading the
object.
 ALIGN: Determines where to place the object.
 LEFT: The object is drawn as a left flush floating object and text flows around it.
 TEXTTOP: Surrounding text is aligned with the top of the object.
 MIDDLE: Object is drawn from the center. Text flow around it.
 TEXTMIDDLE: Surrounding text is aligned with the middle of the object.
 BASELINE: The object is aligned with the baseline of the continous text.
 TEXTBOTTOM: Surrounding text is aligned with the bottom of the object.
 CENTER: Surrounding text is aligned with the center of the object.
 RIGHT: The object is drawn as a right flushfloating object and text flow around it.
 WIDTH: Specifies the suggested width (in pixels).
 HEIGHT: Specifies the suggested height (in pixels).
 BORDER: Specifies the Border of the object when it is part of hypertext link.
 HSPACE: Specifies the suggested width (in pixels) of the area enclosing the
object.
 VSPACE: Specifes the suggested height (in pixels) of the area enclosing the
object.
 USEMAP: This specifies a URL for a client-side image map to be used with the
object.
 SHAPES: It indicates that the object contains anchors with hypertext links.

Cybotech Campus Page 5


Internet Technology & Web Designing BT0055

 NAME: It specifies the name of the object when submitted part as part of a form.
 NOTAB: Exclude the object from the tabbing order.
 TABINDEX: It specifies the object’s position in the tabbing order.

Books ID: B00217

7. Discuss Network Interface using any OS.

Ans:

8. What is OSPF? Explain its working.

Ans: OSPF (Open Shortest Path First) is a router protocol used within larger
autonomous system networks in preference to the Routing Information Protocol (RIP)
an older routing protocol that is installed in many of today's corporate networks. Like
RIP, OSPF is designated by the Internet Engineering Task Force (IETF) as one of
several Interior Gateway Protocols (IGPs).

Using OSPF, a host that obtains a change to a routing table or detects a change in the
network immediately multicast the information to all other hosts in the network so that
all will have the same routing table information. Unlike the RIP in which the entire
routing table is sent, the host using OSPF sends only the part that has changed. With
RIP, the routing table is sent to a neighbor host every 30 seconds. OSPF multicasts the
updated information only when a change has taken place.

Rather than simply counting the number of hos, OSPF bases its path descriptions on
"link states" that take into account additional network information. OSPF also lets the
user assign cost metrics to a given host router so that some paths are given preference.
OSPF supports a variable network subnet mask so that a network can be subdivided.
RIP is supported within OSPF for router-to-end station communication. Since many
networks using RIP are already in use, router manufacturers tend to include RIP
support within a router designed primarily for OSPF.

Cybotech Campus Page 6


Internet Technology & Web Designing BT0055

Cybotech Campus Page 7

You might also like