CSS Style Sheets contained different formats. In those Formats, we can use all according to situations. Those formats have their own name according to their works in the HTML document. 1>>Inline CSS 2>>Internal CSS 3>>External CSS

CSS Inclusion Types

1.Inline CSS

Inline CSS is the best choice for that time, when You want to use styles on specific HTML element. Inline CSS combined with HTML elements like an element’s attribute.
For Example:-
<body style=”background:yellow; font-size:20pt;“>

2.Internal CSS

Internal CSS is the best choice for that time when you want to use styles on a specific HTML element page or Single HTML Page. This type of CSS is used under the HTML document with the style tag.
For Example:-

<html>
<head>
<title>
Internal Style Sheet
</title>
<style>
body
{
   margin:0px;
   padding:0px;
   font-size:18pt;
   background:yellow;
}
</style>
</head>
<body>
</body>
</html>

3.External CSS

External CSS is the best choice for that time when you want to use your cascading styles on multiple page documents. if you want to use your styles on multiple HTML pages, so first you have to create separate CSS files with .CSS extension after creating your CSS file you have to attach the file with HTML document sheet.
Let’s see the example for more clarification.

HTML File  :-  Example.html
----------
<html>
<head>
<title>
External CSS Style
</title>
<link rel="stylesheet" href="/style.css"/>
</head>
<body>
</body>
</html>
CSS File   :- style.css
---------
body
{
    background:red;
    font-size:12pt;
     font-style:bold;
}

By using External CSS, we can apply unique CSS properties to many HTML documents.

Share post

Leave a Reply