Open In App

How to use both Tailwind CSS and Bootstrap 4 at the same time ?

Last Updated : 24 Dec, 2021
Like Article

In this article, we will know how to use Bootstrap with Tailwind CSS, at a moment, in the same code. We can use both the CSS frameworks together but it is not recommended. Because few classes will contradict with each other like “container”, “clearfix”, etc. As we know that Bootstrap is a known CSS framework. Although the Tailwind CSS framework can also be used parallelly in comparison to Bootstrap. Tailwind CSS is basically a utility-first CSS framework that facilitates rapidly building custom user interfaces. So, in the development field, it is more familiar with the Tailwind rather than Bootstrap. There are significant differences in the Tailwind CSS vs Bootstrap.

Suppose there is a pre-build website where the old developers have used Bootstrap and the new developers want to use Tailwind. In that case, the new developer has to be careful with the used Bootstrap classes, where the classes should not contradict each other. We will be using the below CDN links in the code example in order to use the various applicable Bootstrap & Tailwind CSS classes, & utilize them on a single page.

Bootstrap CDN Link:

<link rel=”stylesheet” href=“”> 
<script src=“”></script> 
<script src=“”></script> 
<script src=“”></script>

Tailwind CSS CDN Link:

<link href=“^1.0/dist/tailwind.min.css” rel=”stylesheet”>

Example: In this example, we will use Bootstrap for content alignment, & for text and background color, we will use Tailwind CSS. So both the frameworks will applicable.


<!DOCTYPE html>
    <!-- Bootstrap CDN Links -->
    <link rel="stylesheet"
    <script src=
    <script src=
    <script src=
    <!-- Tailwind CSS CDN Links -->
    <link href=
    <!-- Bootstrap Class -->
    <div class="col">
        <div class="col-md-4">
            <!-- Tailwind CSS Class -->
            <p class="bg-purple-300 p-2">
                <b class="text-green-700">GeeksforGeeks</b>
                <br>This example illustrates the use of
                    Bootstrap and Tailwind side by side.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads