css (3)
css (3)
1. Inline CSS.
2. Internal CSS.
3. External CSS.
Inline CSS
For Inline CSS every style content is in HTML elements. It is used for a limited section.
Whenever our requirements are very small we can use inline CSS.
It will affect only single elements. In HTML we require that various HTML tag's views are
different so then we use inline Cascading Style Sheets. There are disadvantage of inline
Cascading Style Sheets. It must be specified on every HTML tag. There is a lot of time
consumed by that and it is not the best practice for a good programmer and the code
will be quite large and very complex.
External CSS
In External CSS we create a .css file and use it in our HTML page as per our
requirements. Generally external Cascading Style Sheets are used whenever we have
many HTML attributes and we can use them as required; there is no need to rewrite the
CSS style again and again in a complete body of HTML that inherits the property of the
CSS file. There are two ways to create a CSS file. The first is to write the CSS code in
Notepad and save it as a .css file, the second one is to directly add the style sheet in
our Solution Explorer and direct Visual Studio to use it on our HTML page.