Cascading style sheets are the way we define the presentation of the HTML pages, from font and colors to the layout of your page. HTML documents may contain style sheet rules directly in them or they may import style sheets.
There are THREE ways of setting style sheets to your webpage:
External style sheet
Internal style sheet
Inline style
External style
An external style sheet is a separate file where you can define all the styles that you want to use on your website. This is ideal when you want the same style on multiple pages. An external style sheet makes it is easier to to change the look of the entire website and reuse your CSS. You can make drastic changes to your web pages with just a few changes in a single CSS file.
In the example below you can see the file paths, the CSS and HTML files open and what the output is.
Internal style sheet
An internal style sheet is a section on a HTML page that contains style definitions. this type of style sheet should be used when a single document has a unique style. They are defined by using the <style></style> tags between the <head> area of the document.
Inline Style refers to the style sheet information being written inside an element. This is useful when you want to apply a simple style only once. This should be used sparingly.
It does override CSS written externally and internally.
For example
<h3 style=''>This text has no CSS added</h3>
<h3 style='color:steelBlue;'>This text has CSS added</h3>
<h3 style=''>This text has no CSS added</h3>
What happens when you add an internal style sheet as well to change h3 elements?
<style> h3{ color:mediumSeaGreen; } </style> <h3>This text has 'internal CSS' added</h3>
<h3 style='color:steelBlue;'>This text has 'inline CSS' added</h3>