Tailwind CSS Tutorial
Tailwind CSS Tutorial
Tailwind CSS is a utility-first CSS framework for designing websites by using its utility-first pre-defined
classes. It is a low-level CSS framework that is easy to learn and maintain in your projects. Tailwind CSS
has many built-in features and classes that can be directly used on HTML documents.
Utility-First Paradigm: Instead of writing custom CSS you can use pre-defined classes to decorate
your HTML elements.
Responsive Design: Tailwind CSS utility classes can be used based on screen size and
breakpoints, so your website can be responsive.
Consistency and Maintainability: Its unified design ensures that all of your pages can follow a
consistent frontend design with easy maintainability.
Fast Pace Development: Using pre-defined classes will always boost your development pace
compared to using custom CSS.
Design Flexibility: It has the largest pre-defined classes with the opportunity to create your design
to make your design skills more flexible.
You can check the Tailwind CSS Installation guide in this article - Tailwind CSS Installation
Just include a <script> tag in the <head> section of your HTML. This gives access to Tailwind's utility
classes without extra files on your server.
<script src="https://cdn.tailwindcss.com"></script>
Just include a <link> tag in the <head> section of your HTML. This gives access to Tailwind's utility
classes without extra files on your server.
Explore our latest online courses and learn new skills at your own pace. Enroll and become a certified
expert to boost your career.
Open Compiler
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1.0">
<!-- Tailwind CSS CDN Link -->
<script src="https://cdn.tailwindcss.com"></script>
<title>Tailwind CSS - Tutorial</title>
</head>
<body class="bg-gray-100">
<div class="container mx-auto p-4">
<h3 class="text-3xl font-bold">
<span class="text-cyan-400">
Tailwind CSS
</span>
Tutorial by
<span class="text-green-600">Tutorials</span>point
</h3>
<p class="mt-4 text-gray-700">
This is a simple example of Tailwind CSS
on HTML elements, that is how we can use
Tailwind CSS classes.
</p>
<button class="mt-4 px-4 py-2 bg-green-600
text-white rounded
hover:bg-green-900">
Click Me
</button>
</div>
</body>
</html>
Display Visibility
Floats Z-Index
Margin
Width Min-Height
Min-Width Max-Height
Max-Width Size
Height
Opacity
Brightness Invert
Contrast Saturate
Scale Skew
Rotate Transform Origin
Translate
Appearance Resize
Cursor Scroll Behavior
Caret Color Scroll Margin