There 3 ways to add CSS in HTML

Table of contents

No heading

No headings in the article.

  1. Inline CSS - It is added to the elements directly using style attribute.

  2. Internal CSS - It is kept inside the head tags in <style> tag.

  3. External CSS - It is kept separately inside a (.css) file which is further linked to the (index.html) file.