0% found this document useful (0 votes)
7 views

slide-2

External CSS allows for the styling of an entire website through a single file, enhancing efficiency and consistency. Each HTML page must reference the external style sheet using a <link> element in the head section. The document outlines the structure, example code, and advantages of using external CSS for web design.

Uploaded by

SANJEET KUMAR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

slide-2

External CSS allows for the styling of an entire website through a single file, enhancing efficiency and consistency. Each HTML page must reference the external style sheet using a <link> element in the head section. The document outlines the structure, example code, and advantages of using external CSS for web design.

Uploaded by

SANJEET KUMAR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Course :BCA/IT Sem : IV

Lesson : External CSS


(CSS)
SEC-2

By : DR. KHUSHBU KUMARI


Asst. Professor
Dept. Of CA/IT
External
CSS
External CSS
• With an external style sheet, the look of an
entire website can be changed by changing
just one file!
• Each HTML page must include a reference to
the external style sheet file inside the <link>
element, inside the head section.
• An external style sheet is a separate text file
with .css extension
Structure of External CSS

Relation Hyperlink Reference

<head>
<link rel=“stylesheet” type="text/css" href="..." />
</head>

Content type or
MIME(multipurpose
Internet Mail Extension)
type , which specify the
language or extension for
stylesheet.
Example code:
<html>
<head>
<link rel="stylesheet" type="text/
css" href=“style.css">
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Create External CSS File :“style.css”
Body{
background-color: lightblue;
}
h1 {
color: navy;
margin-left: 20px;
}
Advantages of Using External
CSS
• The biggest advantages of external style
sheets are that they can be applied to
multiple documents while being managed
from a single style sheet.
• This improves efficiency and convenience of
designing.
• It is used to keep the website consistent or to
maintain the uniformity in the website.
• Easy to implement.
• This is especially useful if you work with a
team of people to create your website.

You might also like