AnonymousJan 08, 2024
In this post, we will learn how to add Tailwind CSS to html file?
Add the CDN script tag to the <head>
of your HTML file, and start using Tailwind’s utility classes to style your content.
<script src="https://cdn.tailwindcss.com"></script>
After you’ve done that, you should be able to use the classes from Tailwind CSS.
For Example:
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body>
<h1 class="text-3xl font-bold underline">
Hello world!
</h1>
</body>
</html>
Output: