Play CDN
Use the Play CDN to try Tailwind right in the browser without any build step. The Play CDN is designed for development purposes only, and is not the best choice for production.
Installation
Tailwind CSS works by scanning all of your HTML files, JavaScript components, and any other templates for class names, generating the corresponding styles and then writing them to a static CSS file.
It's fast, flexible, and reliable — with zero-runtime.
Use the Play CDN to try Tailwind right in the browser without any build step. The Play CDN is designed for development purposes only, and is not the best choice for production.
Add the Play CDN script tag to the <head>
of your HTML file, and start using Tailwind’s utility classes to style your content.
<!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>
Edit the tailwind.config
object to customize your configuration with your own design tokens.
<!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> <script> tailwind.config = { theme: { extend: { colors: { clifford: '#da373d', } } } } </script></head><body> <h1 class="text-3xl font-bold underline text-clifford"> Hello world! </h1></body></html>
Use type="text/tailwindcss"
to add custom CSS that supports all of Tailwind's CSS features.
<!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> <script>/* ... */</script> <style type="text/tailwindcss"> @layer utilities { .content-auto { content-visibility: auto; } } </style></head><body> <div class="lg:content-auto"> <!-- ... --> </div></body></html>
Use forms
,typography
,aspect-ratio
,line-clamp
to enable officiall plugins independently.
<!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?plugins=forms,typography,aspect-ratio,line-clamp"></script> <script>/* ... */</script></head><body> <div class="line-clamp-3"> <!-- ... --> </div></body></html>
Get familiar with some of the core concepts that make Tailwind CSS different from writing traditional CSS.
Using a utility-first workflow to build complex components from a constrained set of primitive utilities.
Build fully responsive user interfaces that adapt to any screen size using responsive modifiers.
Style elements in interactive states like hover, focus, and more using conditional modifiers.
Optimize your site for dark mode directly in your HTML using the dark mode modifier.
Manage duplication and keep your projects maintainable by creating reusable abstractions.
Customize the framework to match your brand and extend it with your own custom styles.