Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Priyankar Paul 1

29SCS124

Ex. No: 11c


06/04/2011 EXTERNAL CASCADING

Aim:
To design a HTML page using external cascading.

Description:
External style sheet

 Create a separate style sheet file

 This is the best method if you wish to control the design of more than one page.

 The style definitions are only written once and saved into a file. Each page that wishes
to use that file places a link to the file in the HEAD section.

Syntax

Place the following link into the <head> section of your page, use the name you have selected
for the CSS file in place of yourStyleFileName.css

<link rel="STYLESHEET" href="yourStyleFileName.css" type="text/css">

CSS External File

CSS files are ordinary text files and can be written in a simple text editor such as notepad.
The file must be given the extension .css

Program:
Priyankar Paul 2
29SCS124

Main page (external.html)

<html>
<head>
<link rel="stylesheet"
type="text/css" href="ex1.css" />
</head>

<body>

<h1>Hard Drive</h1>
<p>A hard disk drive[2] (HDD) is a non-volatile, random access device for digital data.
It features rotating rigid platters on a motor-driven spindle within a protective enclosure.
Data is magnetically read from and written to the platter by read/write heads that float on a
film of air above the platters.
Introduced by IBM in 1956, hard disk drives have fallen in cost and physical size over the
years while dramatically increasing in capacity.
Hard disk drives have been the dominant device for secondary storage of data in general
purpose computers since the early 1960s.
They have maintained this position because advances in their areal recording density have
kept pace with the requirements for secondary storage.
Today's HDDs operate on high-speed serial interfaces; i.e., serial ATA (SATA) or serial
attached SCSI (SAS).</p>

</body>
</html>

Style Sheet Page (ex1.css)

body
{
background-color:green;
}
h1
{
font-size:36pt;
text-align:center;
}
h2
{
color:white;
text-align:center;
Priyankar Paul 3
29SCS124

}
p { margin-left:50px; }
Priyankar Paul 4
29SCS124

Output:

Result:

Thus the HTML program using external cascading was done and its output was verified.

You might also like