Home  »  CodeSnippets   »   How to Install Tailwind CSS in HTML

How to Install Tailwind CSS in HTML

Posted: February 7, 2022 | by Michael Bright

Using npm:

$ npm install -D tailwindcss
$ npx tailwindcss init

Using PostCSS:

$ npm install -D tailwindcss postcss autoprefixer
$ npx tailwindcss init

Using a CDN:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css" integrity="sha512-wnea99uKIC3TJF7v4eKk4Y+lMz2Mklv18+r4na2Gn1abDRPPOeef95xTzdwGD9e6zXJBteMIhZ1+68QC5byJZw==" crossorigin="anonymous" referrerpolicy="no-referrer" />

Using Yarn:

$ yarn add tailwindcss

Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.