Books ID: B0020 1. How Will You Add Styles To A Document?: Cybotech Campus
Books ID: B0020 1. How Will You Add Styles To A Document?: Cybotech Campus
SET-1
Books ID: B0020
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.
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.
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
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.
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///.
4. Write a Java Script procedure to input 5 numbers and display their sum.
Ans:
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
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
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.
Ans:
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.