There are three types of CSS which are given below:
- Inline CSS
- Internal or Embedded CSS
- External CSS
Inline CSS: Inline CSS contains the CSS property in the body section attached to the element is known as inline CSS. This kind of style is specified within an HTML tag using the style attribute.
Internal or Embedded 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 <style> tag inside the head section of the HTML file.
External CSS: External CSS contains separate CSS files that contain only style properties with the help of tag attributes (For example class, id, heading … etc.). CSS property is written in a separate file with a .CSS extension and should be linked to the HTML document using a <link> tag. It means that, for each element, style can be set only once and will be applied across web pages.