Introduction to Tailwind CSS (original) (raw)

Last Updated : 4 May, 2026

Tailwind CSS is a modern, utility-first framework that lets developers style websites directly in HTML using utility classes. It speeds up UI development by reducing the need for writing custom CSS.

Below is a basic example that imports Tailwind CSS via CDN and applies margin to the body. The heading is styled with Tailwind's utility classes.

index.html `

<!-- Tailwind CSS CDN link -->
<link href="https://unpkg.com/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">

Geeksforgeeks

<p><strong>Tailwind CSS Tutorial</strong></p>

<p>
    You can use Tailwind CSS as a replacement 
    of CSS, this is a framework that increase 
    your pace to design any website.
</p>

`

Features of Tailwind CSS

Features that make Tailwind CSS a powerful and flexible framework for modern web development.

features_of_tailwind_css

Tailwind CSS vs Traditional CSS

The table below highlights the key differences between traditional CSS and Tailwind CSS in terms of development approach and scalability.

Traditional CSS Tailwind CSS
Styles are written in separate CSS files, requiring frequent switching between HTML and CSS Styles are applied directly in HTML using utility classes, reducing context switching
Developers must create and manage custom class names for every component Predefined utility classes remove the need for naming custom CSS classes
UI development is slower due to repetitive CSS writing Rapid UI development using ready-made utility classes
Maintaining consistency becomes difficult as the project grows Consistent and reusable design system that scales easily

Advantages of Tailwind CSS

Limitations of Tailwind CSS