There are three types of CSI styles internal inline and external styles.
This HDMI page illustrates an example of an internal style sheet and inline styles an internal style
sheet simply means that the style sheet is contained in the same HMO document in which the styles are
used.
Here.
We've defined a style sheet in between our head tags with three rules that will format the body the
header one tags and the paragraph elements.
This is an example of an internal style sheet we can easily convert this into an external style sheet
by placing our style rules in a CSX file and linking to it to do so cut the styles rules out and delete
the style tags
now create a new file and paste the style rules into it.
Now save this file as my styles dot the SS.
You can use any name you want that's just an example.
Make sure that the extension is a dot c SS file.
Otherwise this will not work
now when a switch back to the original file and we're going to link to our external style sheet using
this line of code
we can confirm that it worked by previewing the file in our web browser
and you can see that all the styles are still applied.
In addition to internal and external install sheets we also have inline C Ss
with inline C Ss the style rules are added directly inside the element.
For example here we have a paragraph element with two inline rules.
Style is equal color blue and font size thirty five we can see in our web browser that the style rules
have been applied to this paragraph of text the text size is 35 pixels and the color is blue using inline
rules is normally not a good practice because it's inefficient.
If we used inline rules on all our pages we would need to individually open each one and edit the rule
inline rules also cause unnecessary repetition and increase the length of the HMO code when possible
use external style sheets.