How to use Pure.CSS
There are two ways to use Pure.CSS:
- Install Locally
- Using CDN Based Version
Install Locally
You can download the latest version of pure.css file on your system from here: https://purecss.io/start/ and include it in your HTML code.
Example
Let’s see how to include the CSS file in HTML file.
Output:
Using CDN Based Version
You can add the pure.css file directly to your HTML page from the Content Delivery Network (CDN). yui.yahooapis.com provides content for the latest version.
Or
You can add Pure to your page via the free unpkg CDN. Just add the following <link> element into your page’s <head>, before your project’s stylesheets.
Let’s use the yui.yahooapis.com CDN version of the library in the following example. Rewrite the above example in a second way.
Example
Output:
It will show a result like this:
You can see that this is the same example but using another way.