Type of CSS | सीएसएस के प्रकार


Type of CSS | सीएसएस के प्रकार- 


Inline CSS-

CSS contains the CSS property in the body section attached with element is known as inline CSS. This kind of CSS style is specified within an HTML tag using the style attribute. 
Syntax:-
        <tag_name style=“Property_Name:Value; “> 
Example:- 
            <p style=“font-size:18px;color:red”> 
            Paragraph Text 
            </p>

Internal CSS-

This can be used when a single HTML document must be styled uniquely. The CSS rule set should be within the HTML file in the head section i.e the CSS is embedded within the HTML file.

Syntax:-
<head> 
<style type="text/css"> 
Selector { 
Property : value; Property : value; 
</style> 
</head>

External CSS-

External CSS contains separate CSS file which contains only style property with the help of tag attributes (class, id, heading, … etc.). CSS property written in a separate file with .css extension and should be linked to the HTML document using link tag

Syntax:- Link CSS File into HTML 

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


Post a Comment

0 Comments