Three ways of including CSS to your HTML

Three ways of including CSS to your HTML

There are three ways of including a CSS file :

  1. External CSS
  2. Internal CSS
  3. Inline CSS

External CSS : The CSS code is written in an entire new file with .css extension and is linked to the HTML file using the "link" tag in the "head" section.

Internal CSS : The CSS code is written in the same HTML file. The code is written in between the "style" tags inside the "head" section.

Inline CSS : It is used to apply style to a single element. The CSS code is written inside the opening tag of the element to which style has to be applied.