Answer 1) - There Are Three Basic Ways To Include Style Information in An HTML
Answer 1) - There Are Three Basic Ways To Include Style Information in An HTML
a). 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 extensions
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.
b). Embedding and Importing Style Sheets :- The second way to include an external
style sheet is to embed it. When you embed a style sheet, you 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 document. Enclose the style rules within the <STYLE>
and </STYLE> tag pair and place these within the head section of the HTML
document.
c). Using Inline Styles :- 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. This is how it works. Consider an example. Let’s say you want to set
one particular <H1> tag to render 48-point, green, Arial font. Then you need to apply
that style to <H1> elements or to a class of them (discussed later) by applying a
document-wide style. You can also apply the style to the tag in question, using the
STYLE attribute, which can be used within nearly any HTML element.
The output is
In the above example we learnt, about how to view the XML document in the
Browser.
The output:
Answer 4).
<script type="text/javascript">
//Write a "Good morning" greeting if
//the time is less than 10
if (time<10)
{
document.write("<b>Good morning</b>");
}
</script>
Variant Subtypes
Answer 7). Dynamic Host Configuration Protocol (DHCP) provides a framework for
passing configuration information to hosts on a TCP/IP network. DHCP is based on
the BOOTP protocol, adding the capability of automatic allocation of reusable
network addresses and additional configuration options. DHCP messages use
UDP port 67, the BOOTP server's well-known port and UDP port 68, the BOOTP
client's well-known port. DHCP participants can interoperate with BOOTP
participants.
DHCP consists of two components:
1. A protocol that delivers host-specific configuration parameters from a DHCP
server to a host.
2. A mechanism for the allocation of temporary or permanent network
addresses to hosts. IP requires the setting of many parameters within the protocol
implementation software. Because IP can be used on many dissimilar kinds of network
hardware, values for those parameters cannot be guessed at or assumed to have
correct defaults. The use of a distributed address allocation scheme based on a
polling/defense mechanism, for discovery of network addresses already in use,
cannot guarantee unique network addresses because hosts may not always be
able to defend their network addresses.
DHCP supports three mechanisms for IP address allocation:
1. Automatic allocation: DHCP assigns a permanent IP address to the host.
2. Dynamic allocation: DHCP assigns an IP address for a limited period of
time. Such a network address is called a lease. This is the only mechanism
that allows automatic reuse of addresses that are no longer needed by the
host to which it was assigned.
3. Manual allocation: The host’s address is assigned by a network administrator
The Open Shortest Path First (OSPF) protocol is another example of an interior
gateway protocol. It was developed as a non-proprietary routing alternative to
address the limitations of RIP. OSPF provides a number of features not found in
distance vector protocols. Support for these features has made OSPF a widely-
deployed routing protocol in large networking environments. In fact, RFC 1812 –
Requirements for IPv4 Routers, lists OSPF as the only required dynamic routing
protocol. The following features contribute to the continued acceptance of the
OSPF standard:
Equal cost load balancing: The simultaneous use of multiple paths may
provide more efficient utilization of network resources.
Logical partitioning of the network: This reduces the propagation of
outage information during adverse conditions. It also provides the ability to
aggregate routing announcements that limit the advertisement of
unnecessary subnet information.
Support for authentication: OSPF supports the authentication of any node
transmitting route advertisements. This prevents fraudulent sources from
corrupting the routing tables.
Faster convergence time: OSPF provides instantaneous propagation of
routing changes. This expedites the convergence time required to update
network topologies.
Support for CIDR and VLSM: This allows the network administrator to
efficiently allocate IP address resources.
OSPF is a link state protocol. As with other link state protocols, each OSPF
router executes the SPF algorithm to process the information stored in the link
state database. The algorithm produces a shortest-path tree detailing the
preferred routes to each destination network.