CSS Style Sheet Types

CSS Full Form is Cascading Style Sheets,its mainly used  to display html page.when user need to change page background color or any other decoration its should be used to particular time. CSS is a html design part of a system. CSS latest version is 3.0.




Follownig CSS types:

  1. Inline Style Sheet
  2. Internal Style Sheet
  3. External Style Sheet

Inline Style Sheet:

inline style system basically code used into inner side HTML tags;

Example:

Take <h1> tag and change font color,
like this way <h1 style="color:green;">Hello World</h1>Take <h1
so, code used for inner h1 tag like style ="color:green;"-> this type of declaration called Inline style sheet.

Full Inline html,css Code:

<html>
<body>
<h1 style="color: green;">Hello World</h1>
</body>
</html>

 

Internal Style Sheet:

Internal style system  similar to inline style system,but one change code can be used in <head> section.

like this way <head><style>h1{color:green;}</style></head>

Example:

Full Internal html,css code:
<html>
<head>
<style>
h1{
color:green;
}
</style>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>

External Style Sheet:

External style system used to css code for another page,in this page can be save format is  file-name.css, External style sheet system mostly used for web development process time.And web developer’s also recommended or used that type style sheet system.

Example:

Step 1: create one html page  like (file-name.html)

Step 2: create another one css page like(file-name.css)

Step 3: open html page and put this below code

<html>
<body>
<h1>Hello World</h1>
</body>
</html>

Step 4: open css page and put this below code

h1{
color:green;
}

Step 5: open any browser and run the html file,see the output.

Output :

All Output same but code declaration is different.




Add a Comment

Your email address will not be published. Required fields are marked *